{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentSearch News Search",
    "version": "1.0.0",
    "description": "Recent news articles as JSON. 10 free calls per IP on https://relay.agentsearchhq.com/v1/news, then $0.003 via https://api.agentsearchhq.com/x402/v1/news.",
    "contact": {
      "url": "https://agentsearchhq.com/news"
    }
  },
  "servers": [
    {
      "url": "https://relay.agentsearchhq.com",
      "description": "Free relay (10 news searches per IP)"
    },
    {
      "url": "https://api.agentsearchhq.com",
      "description": "Paid x402 API ($0.003) \u2014 use /x402/v1/news"
    }
  ],
  "paths": {
    "/v1/news": {
      "post": {
        "summary": "News search",
        "description": "Recent news for a topic, company or event.",
        "operationId": "news_search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 400,
                    "description": "News topic, company, person or event."
                  },
                  "max_results": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10,
                    "description": "How many articles (default 5)."
                  }
                }
              },
              "example": {
                "query": "Federal Reserve interest rate",
                "max_results": 5
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Includes free_allowance when served by the free relay."
          },
          "400": {
            "description": "Invalid input."
          },
          "402": {
            "description": "Free allowance used; x402 payment required (AgentSearch-tagged clients receive 429)."
          },
          "429": {
            "description": "Free allowance used (AgentSearch packages) or a daily trial cap."
          }
        }
      }
    }
  }
}
