{"openapi":"3.1.0","info":{"title":"Penny Data","version":"1.1.0","description":"Pay-per-call UK data APIs for AI agents: Companies House company profiles and Great Britain postcode lookups, as JSON. Pay with x402 in USDC on Base; no API key or account.","contact":{"email":"hello@syedwebsites.co.uk"},"x-guidance":"Each route takes 1 path value (see the parameter). The first response is 402 with x402 payment details in the PAYMENT-REQUIRED header; pay the stated USDC amount on Base and retry with the PAYMENT-SIGNATURE header. You are charged only when data (200) is returned."},"servers":[{"url":"https://x402-lab.vercel.app"}],"paths":{"/api/company/{number}":{"get":{"operationId":"companyLookup","summary":"UK Company Lookup","description":"UK company profile from the Companies House public register, returned as JSON.","tags":["UK Company Lookup"],"parameters":[{"name":"number","in":"path","required":true,"description":"Companies House company number: up to 8 digits, or a 2-letter prefix such as SC followed by digits.","schema":{"type":"string","pattern":"^[A-Za-z]{0,2}[0-9]{1,8}$","example":"00445790"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Name, status, type, incorporation date, registered office, SIC codes, and when the next accounts and confirmation statement are due.","content":{"application/json":{"schema":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"status":{"type":["string","null"]},"type":{"type":["string","null"]},"incorporation_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"registered_office_address":{"type":"object","properties":{"care_of":{"type":["string","null"]},"po_box":{"type":["string","null"]},"premises":{"type":["string","null"]},"address_line_1":{"type":["string","null"]},"address_line_2":{"type":["string","null"]},"locality":{"type":["string","null"]},"region":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}}},"sic_codes":{"type":"array","items":{"type":"string"}},"accounts_next_due":{"type":["string","null"],"description":"YYYY-MM-DD"},"confirmation_statement_next_due":{"type":["string","null"],"description":"YYYY-MM-DD"}},"required":["company_number","company_name"]},"example":{"company_number":"00445790","company_name":"TESCO PLC","status":"active","type":"plc","incorporation_date":"1947-11-27","registered_office_address":{"care_of":null,"po_box":null,"premises":null,"address_line_1":"Tesco House, Shire Park","address_line_2":"Kestrel Way","locality":"Welwyn Garden City","region":null,"postal_code":"AL7 1GA","country":"United Kingdom"},"sic_codes":["47110"],"accounts_next_due":"2027-08-26","confirmation_statement_next_due":"2027-07-02"}}}},"400":{"description":"Malformed input. Not charged."},"402":{"description":"Payment Required. x402 payment details in the PAYMENT-REQUIRED header."},"404":{"description":"Not found upstream. Not charged."},"502":{"description":"Companies House unavailable or returned an error. Not charged."}}}},"/api/postcode/{postcode}":{"get":{"operationId":"postcodeLookup","summary":"UK Postcode Lookup","description":"Location and areas for a Great Britain postcode: latitude and longitude, ward, district, constituency and region, as JSON.","tags":["UK Postcode Lookup"],"parameters":[{"name":"postcode","in":"path","required":true,"description":"Great Britain postcode, with or without the space, any case. Northern Ireland (BT) is not supported.","schema":{"type":"string","pattern":"^[A-Za-z]{1,2}[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}$","example":"SW1A1AA"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The postcode, its latitude and longitude, and its ward, district, parliamentary constituency, region and country.","content":{"application/json":{"schema":{"type":"object","properties":{"postcode":{"type":"string"},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"ward":{"type":["string","null"]},"district":{"type":["string","null"]},"constituency":{"type":["string","null"],"description":"Westminster parliamentary constituency (2024 boundaries)"},"region":{"type":["string","null"],"description":"English region; null in Scotland and Wales"},"country":{"type":["string","null"]}},"required":["postcode"]},"example":{"postcode":"SW1A 1AA","latitude":51.50101,"longitude":-0.141563,"ward":"St James's","district":"Westminster","constituency":"Cities of London and Westminster","region":"London","country":"England"}}}},"400":{"description":"Malformed input. Not charged."},"402":{"description":"Payment Required. x402 payment details in the PAYMENT-REQUIRED header."},"404":{"description":"Not found upstream. Not charged."},"502":{"description":"postcodes.io unavailable or returned an error. Not charged."}}}}}}