{"openapi":"3.1.0","info":{"title":"Public Tenders ES/EU","description":"Normalized search over public-sector tenders published in TED (EU official procurement notices) -- covers Spain plus the rest of the EU, filterable by country, keyword, recency, and CPV classification.","version":"1.0.0","contact":{"email":"dasaanrod@gmail.com"}},"paths":{"/search-public-tenders":{"post":{"summary":"Search Public Tenders Endpoint","description":"Normalized search over public-sector tenders in TED (EU official\nprocurement notices, covers Spain + rest of EU). Payment (x402, $0.01)\nsettles BEFORE this handler runs, at the ASGI middleware layer ahead of\nrequest validation -- a call is charged even if it 422s, 502s, or 504s\n(a TED upstream failure or an invalid request is still a charged,\nanswered call attempt, same convention as every other paid asset in\nthis codebase). Results may come from a 1-hour cache (`cache_hit: true`)\n-- see README \"State (db_constraint exception)\".","operationId":"search_public_tenders_endpoint_search_public_tenders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTendersRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Search Public Tenders Endpoint Search Public Tenders Post"}}}},"422":{"description":"invalid request body (bad country code, out-of-range days_back/limit)"},"502":{"description":"TED upstream error -- still charged, see below"},"504":{"description":"TED upstream timeout -- still charged, see below"},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"SearchTendersRequest":{"properties":{"country":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Country","description":"ISO-3166 alpha-3 buyer-country code (e.g. 'ESP'), or 'ALL' for EU-wide.","default":"ESP"},"keyword":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Keyword","description":"Full-text search over notice content."},"cpv_prefix":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Cpv Prefix","description":"CPV classification code prefix filter (e.g. '45' for construction works)."},"days_back":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Days Back","description":"Publication recency window in days, 1-90. Default 30.","default":30},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Max results to return, 1-50. Default 20.","default":20}},"type":"object","title":"SearchTendersRequest"}}}}