{"openapi":"3.0.3","info":{"title":"Tender Data API","version":"0.1.0","description":"Search the latest ingested Find a Tender notice for each procurement. One source, bounded ingestion window, explicit freshness. Does not determine bidder eligibility. Default launch price $0.01 per successful request via x402; the live challenge is authoritative."},"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"Signed x402 payment authorization, not a conventional API key. Inspect the unsigned 402 challenge before signing."}}},"servers":[{"url":"https://api.alexstokes.com"}],"paths":{"/v1/tenders":{"get":{"security":[{"x402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"operationId":"searchTenderOpportunities","summary":"Search UK tenders and public procurement notices","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string","maxLength":200,"description":"Literal case-insensitive AND keyword terms across title, description, buyer and CPV descriptions."}},{"in":"query","name":"cpv","required":false,"schema":{"type":"string","pattern":"^\\d{2,8}$","description":"CPV code prefix."}},{"in":"query","name":"region","required":false,"schema":{"type":"string","maxLength":12,"description":"Published delivery region code prefix, e.g. UKG for West Midlands. Not buyer office location; national-only and missing locations may be omitted."}},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["open","closed","cancelled","planned","unknown","all"],"default":"open","description":"Derived from the latest ingested notice. Open does not establish supplier eligibility."}},{"in":"query","name":"deadline_from","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"deadline_to","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"min_value","required":false,"schema":{"type":"number","minimum":0}},{"in":"query","name":"max_value","required":false,"schema":{"type":"number","minimum":0}},{"in":"query","name":"currency","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$","description":"Required with value filters; no currency conversion."}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":25,"default":10}},{"in":"query","name":"offset","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000,"default":0}},{"in":"query","name":"snapshot","required":false,"schema":{"type":"string","maxLength":80,"description":"Copy meta.snapshot from page one when offset > 0; changed dataset returns 409."}}],"responses":{"200":{"description":"Successful query, including a valid search with zero matches. Chargeable when payments are required.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["ocid","notice_id","published_at","retrieved_at","availability","source_url","licence"],"properties":{"ocid":{"type":"string"},"notice_id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"buyer":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}}},"published_at":{"type":"string","format":"date-time"},"retrieved_at":{"type":"string","format":"date-time"},"source_tags":{"type":"array","items":{"type":"string"}},"source_status":{"type":"string","nullable":true},"procurement_method":{"type":"string","nullable":true},"procurement_method_details":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"submission_deadline":{"type":"string","format":"date-time","nullable":true},"submission_start":{"type":"string","format":"date-time","nullable":true},"availability":{"type":"string","enum":["open","closed","cancelled","planned","unknown"]},"availability_basis":{"type":"string"},"record_basis":{"type":"string"},"value":{"type":"object","nullable":true,"properties":{"amount":{"type":"number"},"currency":{"type":"string"},"amount_gross":{"type":"number","nullable":true},"basis":{"type":"string"}}},"cpv_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string","nullable":true}}}},"delivery_locations":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","nullable":true},"locality":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"country_name":{"type":"string","nullable":true}}}},"lots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}}}},"source_url":{"type":"string","format":"uri"},"source_api_url":{"type":"string","format":"uri"},"licence":{"type":"string","format":"uri"},"attribution":{"type":"string"},"missing_fields":{"type":"array","items":{"type":"string"}},"ingested_notices":{"type":"array","items":{"type":"object","properties":{"notice_id":{"type":"string"},"published_at":{"type":"string"}}}},"ingested_notices_truncated":{"type":"boolean"}}}},"meta":{"type":"object","required":["source","snapshot","coverage","as_of"],"properties":{"source":{"type":"string"},"source_url":{"type":"string"},"dataset_mode":{"type":"string","enum":["live","sample"]},"snapshot":{"type":"string","nullable":true},"coverage_from":{"type":"string","nullable":true},"last_successful_sync":{"type":"string","nullable":true},"source_checked_from":{"type":"string","nullable":true},"source_checked_through":{"type":"string","nullable":true},"sync_error":{"type":"string","nullable":true},"source_retry_after":{"type":"string","nullable":true},"age_seconds":{"type":"integer","nullable":true},"fresh":{"type":"boolean"},"procurement_count":{"type":"integer"},"notice_count":{"type":"integer"},"coverage":{"type":"string"},"search_basis":{"type":"string"},"as_of":{"type":"string"},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"next_offset":{"type":"integer","nullable":true},"pagination_limit":{"type":"integer"},"pagination_note":{"type":"string"},"search_note":{"type":"string"}}}}}}},"headers":{"PAYMENT-RESPONSE":{"description":"x402 settlement result, base64 encoded. Exact signed-request replay returns the original receipt without charging again.","schema":{"type":"string"}}}},"400":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"402":{"description":"x402 payment required or rejected. Use a compatible x402 client.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 x402 v2 payment requirements and discovery metadata.","schema":{"type":"string"}}}},"404":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"409":{"description":"SNAPSHOT_CHANGED: restart pagination. PAYMENT_PENDING: do not pay again; retain recovery ID for operator reconciliation. PAYMENT_ALREADY_USED: restore the exact original URL and signed header.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"429":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"500":{"description":"Unexpected application or payment-processing error."},"503":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}}}}},"/v1/tenders/{ocid}":{"get":{"security":[{"x402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"operationId":"getTenderOpportunity","summary":"Get latest ingested notice and known notice identifiers","parameters":[{"in":"path","name":"ocid","required":true,"schema":{"type":"string","pattern":"^ocds-h6vhtk-[A-Za-z0-9-]{1,100}$"}}],"responses":{"200":{"description":"Successful query, including a valid search with zero matches. Chargeable when payments are required.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["ocid","notice_id","published_at","retrieved_at","availability","source_url","licence"],"properties":{"ocid":{"type":"string"},"notice_id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"buyer":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}}},"published_at":{"type":"string","format":"date-time"},"retrieved_at":{"type":"string","format":"date-time"},"source_tags":{"type":"array","items":{"type":"string"}},"source_status":{"type":"string","nullable":true},"procurement_method":{"type":"string","nullable":true},"procurement_method_details":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"submission_deadline":{"type":"string","format":"date-time","nullable":true},"submission_start":{"type":"string","format":"date-time","nullable":true},"availability":{"type":"string","enum":["open","closed","cancelled","planned","unknown"]},"availability_basis":{"type":"string"},"record_basis":{"type":"string"},"value":{"type":"object","nullable":true,"properties":{"amount":{"type":"number"},"currency":{"type":"string"},"amount_gross":{"type":"number","nullable":true},"basis":{"type":"string"}}},"cpv_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string","nullable":true}}}},"delivery_locations":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","nullable":true},"locality":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"country_name":{"type":"string","nullable":true}}}},"lots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}}}},"source_url":{"type":"string","format":"uri"},"source_api_url":{"type":"string","format":"uri"},"licence":{"type":"string","format":"uri"},"attribution":{"type":"string"},"missing_fields":{"type":"array","items":{"type":"string"}},"ingested_notices":{"type":"array","items":{"type":"object","properties":{"notice_id":{"type":"string"},"published_at":{"type":"string"}}}},"ingested_notices_truncated":{"type":"boolean"}}},"meta":{"type":"object","required":["source","snapshot","coverage","as_of"],"properties":{"source":{"type":"string"},"source_url":{"type":"string"},"dataset_mode":{"type":"string","enum":["live","sample"]},"snapshot":{"type":"string","nullable":true},"coverage_from":{"type":"string","nullable":true},"last_successful_sync":{"type":"string","nullable":true},"source_checked_from":{"type":"string","nullable":true},"source_checked_through":{"type":"string","nullable":true},"sync_error":{"type":"string","nullable":true},"source_retry_after":{"type":"string","nullable":true},"age_seconds":{"type":"integer","nullable":true},"fresh":{"type":"boolean"},"procurement_count":{"type":"integer"},"notice_count":{"type":"integer"},"coverage":{"type":"string"},"search_basis":{"type":"string"},"as_of":{"type":"string"},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"next_offset":{"type":"integer","nullable":true},"pagination_limit":{"type":"integer"},"pagination_note":{"type":"string"},"search_note":{"type":"string"}}}}}}},"headers":{"PAYMENT-RESPONSE":{"description":"x402 settlement result, base64 encoded. Exact signed-request replay returns the original receipt without charging again.","schema":{"type":"string"}}}},"400":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"402":{"description":"x402 payment required or rejected. Use a compatible x402 client.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 x402 v2 payment requirements and discovery metadata.","schema":{"type":"string"}}}},"404":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"409":{"description":"SNAPSHOT_CHANGED: restart pagination. PAYMENT_PENDING: do not pay again; retain recovery ID for operator reconciliation. PAYMENT_ALREADY_USED: restore the exact original URL and signed header.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"429":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"500":{"description":"Unexpected application or payment-processing error."},"503":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}}}}},"/service.json":{"get":{"operationId":"paymentConfiguration","summary":"Free current payment network, price and recovery instructions","responses":{"200":{"description":"Public service configuration."}}}},"/llms.txt":{"get":{"operationId":"agentGuide","summary":"Free agent integration guide","responses":{"200":{"description":"Plain-text guide including reliable retries and data limitations."}}}},"/status":{"get":{"operationId":"datasetStatus","summary":"Free data freshness and coverage information","responses":{"200":{"description":"Status, even when the dataset is stale or not initialized."}}}},"/health":{"get":{"operationId":"health","responses":{"200":{"description":"Process is running."}}}},"/ready":{"get":{"operationId":"ready","responses":{"200":{"description":"Dataset is ready; does not test payment facilitator."},"503":{"description":"JSON error with code, message and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}}}}}}}