{"openapi":"3.1.0","info":{"title":"Token Budget Saver","version":"1.0.0","description":"Fetch a web page server-side and return a token-efficient extract for AI agents. Strips HTML clutter, scripts, styles, navigation, ads.","x-guidance":"Call GET /api/digest?url=<target>. Returns clean text plus token-count estimates. Payment is $0.002 USDC per call via x402 v2 on Base or Solana. Pay the 402 challenge, then retry with the PAYMENT-SIGNATURE header.","contact":{"email":"anwarinowac@gmail.com"}},"servers":[{"url":"https://agentwebintel.up.railway.app"}],"paths":{"/api/digest":{"get":{"operationId":"digest","summary":"Fetch URL, return token-optimized extract","x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"0.002"}},"protocols":[{"x402":{}}]},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"description":"The target web page URL to fetch and optimize"}],"responses":{"200":{"description":"Clean extract","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/api/research":{"post":{"operationId":"research","summary":"Cross-platform trend intelligence synthesis","description":"Scrapes Reddit and the Web via mobile proxy rotation, detects cross-platform patterns, and returns structured sentiment + intelligence report.","x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"0.50"}},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["topic"],"properties":{"topic":{"type":"string","description":"Topic or keyword to research"},"platforms":{"type":"array","items":{"type":"string","enum":["reddit","web"]},"description":"Platforms to scrape. Defaults to reddit+web."},"days":{"type":"integer","description":"Time range in days (default 30, max 90)"},"country":{"type":"string","description":"ISO country code (default US)"}}}}}},"responses":{"200":{"description":"Structured intelligence report with patterns, sentiment, and top discussions","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}}}}