{"openapi":"3.1.0","info":{"title":"Penny Data","version":"1.2.0","description":"Pay-per-call data APIs for AI agents: UK company profiles and filing history, LEI records, GB postcodes and electricity carbon intensity, ECB euro reference rates and UK food hygiene ratings, as JSON. Pay with x402 in USDC on Base; no API key or account.","contact":{"email":"hello@pennydatahq.com"},"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://pennydatahq.com"}],"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":"02366777"}}],"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":"02366777","company_name":"DWR CYMRU CYFYNGEDIG","status":"active","type":"ltd","incorporation_date":"1989-04-01","registered_office_address":{"care_of":null,"po_box":null,"premises":null,"address_line_1":"Dwr Cymru Welsh Water Linea, Fortran Road","address_line_2":"St. Mellons","locality":"Cardiff","region":null,"postal_code":"CF3 0LT","country":"Wales"},"sic_codes":["36000","37000"],"accounts_next_due":"2027-12-31","confirmation_statement_next_due":"2027-04-14"}}}},"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."}}}},"/api/filings/{number}":{"get":{"operationId":"filingHistory","summary":"UK Company Filing History","description":"Recent filings and key dates for a UK company from the Companies House public register: accounts and confirmation statement dates and the latest filings by date and form type, as JSON. Officer and PSC filings are excluded.","tags":["UK Company Filing History"],"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":"02366777"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Company name, status and key dates (incorporation, dissolution, accounts and confirmation statement: last made up to, next due, overdue), the total number of filings, and up to 25 of the most recent filings with date, form type, category, a description code and the made-up date where there is one. Officer and PSC filings are excluded.","content":{"application/json":{"schema":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"status":{"type":["string","null"]},"key_dates":{"type":"object","properties":{"incorporation_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"dissolution_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"accounts":{"type":"object","properties":{"last_made_up_to":{"type":["string","null"],"description":"YYYY-MM-DD"},"next_made_up_to":{"type":["string","null"],"description":"YYYY-MM-DD"},"next_due":{"type":["string","null"],"description":"YYYY-MM-DD"},"overdue":{"type":["boolean","null"]}}},"confirmation_statement":{"type":"object","properties":{"last_made_up_to":{"type":["string","null"],"description":"YYYY-MM-DD"},"next_made_up_to":{"type":["string","null"],"description":"YYYY-MM-DD"},"next_due":{"type":["string","null"],"description":"YYYY-MM-DD"},"overdue":{"type":["boolean","null"]}}}}},"total_filings":{"type":["integer","null"],"description":"All filings on the register, including excluded ones"},"filings":{"type":"array","description":"Up to 25, newest first; officer and PSC filings excluded","items":{"type":"object","properties":{"date":{"type":["string","null"],"description":"YYYY-MM-DD"},"form":{"type":["string","null"],"description":"Companies House form type, for example AA or CS01"},"category":{"type":["string","null"]},"description_code":{"type":["string","null"],"description":"Companies House filing description key"},"made_up_date":{"type":["string","null"],"description":"YYYY-MM-DD"}}}}},"required":["company_number","company_name","key_dates","filings"]},"example":{"company_number":"02366777","company_name":"DWR CYMRU CYFYNGEDIG","status":"active","key_dates":{"incorporation_date":"1989-04-01","dissolution_date":null,"accounts":{"last_made_up_to":"2026-03-31","next_made_up_to":"2027-03-31","next_due":"2027-12-31","overdue":false},"confirmation_statement":{"last_made_up_to":"2026-03-31","next_made_up_to":"2027-03-31","next_due":"2027-04-14","overdue":false}},"total_filings":279,"filings":[{"date":"2026-09-16","form":"AA","category":"accounts","description_code":"accounts-with-accounts-type-full","made_up_date":"2026-03-31"},{"date":"2026-04-15","form":"CS01","category":"confirmation-statement","description_code":"confirmation-statement-with-no-updates","made_up_date":"2026-03-31"}]}}}},"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/lei/{lei}":{"get":{"operationId":"leiLookup","summary":"LEI Lookup","description":"Legal Entity Identifier (LEI) record from the GLEIF global index: legal name, status, jurisdiction, addresses, registration dates and direct and ultimate parents, as JSON.","tags":["LEI Lookup"],"parameters":[{"name":"lei","in":"path","required":true,"description":"20-character LEI (ISO 17442), any case. The check digits are verified.","schema":{"type":"string","pattern":"^[A-Za-z0-9]{18}[0-9]{2}$","example":"RR3QWICWWIPCS8A4S074"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The LEI, legal name, previous and other names, entity status, category, legal form code, jurisdiction, local registration number, legal and headquarters addresses, creation date, LEI registration status and dates, BIC codes, and the direct and ultimate parent (LEI, name, country) where reported.","content":{"application/json":{"schema":{"type":"object","properties":{"lei":{"type":"string"},"legal_name":{"type":"string"},"other_names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":["string","null"]}}}},"entity_status":{"type":["string","null"],"description":"ACTIVE or INACTIVE"},"category":{"type":["string","null"],"description":"GENERAL, BRANCH, FUND, and others; sole traders are not served"},"legal_form_code":{"type":["string","null"],"description":"ISO 20275 entity legal form code"},"jurisdiction":{"type":["string","null"]},"registered_as":{"type":["string","null"],"description":"Number at the local business register"},"legal_address":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"}},"city":{"type":["string","null"]},"region":{"type":["string","null"],"description":"ISO 3166-2 code"},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"],"description":"ISO 3166-1 alpha-2"}}},"headquarters_address":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"}},"city":{"type":["string","null"]},"region":{"type":["string","null"],"description":"ISO 3166-2 code"},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"],"description":"ISO 3166-1 alpha-2"}}},"entity_creation_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"registration":{"type":"object","properties":{"status":{"type":["string","null"],"description":"ISSUED, LAPSED, RETIRED, and others"},"initial_registration_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"last_update_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"next_renewal_date":{"type":["string","null"],"description":"YYYY-MM-DD"},"corroboration_level":{"type":["string","null"]}}},"bic":{"type":"array","items":{"type":"string"}},"direct_parent":{"type":["object","null"],"description":"null when not reported","properties":{"lei":{"type":"string"},"legal_name":{"type":["string","null"]},"country":{"type":["string","null"]}}},"ultimate_parent":{"type":["object","null"],"description":"null when not reported","properties":{"lei":{"type":"string"},"legal_name":{"type":["string","null"]},"country":{"type":["string","null"]}}}},"required":["lei","legal_name"]},"example":{"lei":"RR3QWICWWIPCS8A4S074","legal_name":"NATWEST MARKETS PLC","other_names":[{"name":"THE ROYAL BANK OF SCOTLAND PUBLIC LIMITED COMPANY","type":"PREVIOUS_LEGAL_NAME"}],"entity_status":"ACTIVE","category":"GENERAL","legal_form_code":"B6ES","jurisdiction":"GB","registered_as":"SC090312","legal_address":{"lines":["36 ST ANDREW SQUARE"],"city":"EDINBURGH","region":"GB-EDH","postal_code":"EH2 2YB","country":"GB"},"headquarters_address":{"lines":["36 ST ANDREW SQUARE"],"city":"EDINBURGH","region":"GB-EDH","postal_code":"EH2 2YB","country":"GB"},"entity_creation_date":"1984-10-31","registration":{"status":"ISSUED","initial_registration_date":"2012-06-06","last_update_date":"2026-08-28","next_renewal_date":"2027-10-27","corroboration_level":"FULLY_CORROBORATED"},"bic":["ABNAINBBXXX","NATGGB21XXX"],"direct_parent":{"lei":"2138005O9XJIJN4JPN90","legal_name":"NATWEST GROUP PLC","country":"GB"},"ultimate_parent":{"lei":"2138005O9XJIJN4JPN90","legal_name":"NATWEST GROUP PLC","country":"GB"}}}}},"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":"GLEIF unavailable or returned an error. Not charged."}}}},"/api/carbon/{postcode}":{"get":{"operationId":"carbonIntensity","summary":"GB Carbon Intensity","description":"Forecast carbon intensity of Great Britain electricity for the current half hour in the region of a postcode, with the generation mix, as JSON.","tags":["GB Carbon Intensity"],"parameters":[{"name":"postcode","in":"path","required":true,"description":"Great Britain postcode or outward code (the first half, such as RG10), with or without the space, any case. Northern Ireland (BT) is not on the GB grid and 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":"RG10"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The outward code, its electricity region and distribution network area, the half hour covered (UTC), the forecast carbon intensity in gCO2/kWh with its index (very low to very high), and the generation mix by fuel in percent.","content":{"application/json":{"schema":{"type":"object","properties":{"postcode":{"type":"string","description":"Outward code"},"region":{"type":["string","null"]},"dno_region":{"type":["string","null"],"description":"Distribution network operator area"},"from":{"type":["string","null"],"description":"Start of the half hour, ISO 8601 UTC"},"to":{"type":["string","null"],"description":"End of the half hour, ISO 8601 UTC"},"intensity_gco2_per_kwh":{"type":["number","null"],"description":"Regional forecast"},"intensity_index":{"type":["string","null"],"description":"very low, low, moderate, high or very high"},"generation_mix":{"type":"object","description":"Percent by fuel","additionalProperties":{"type":"number"}}},"required":["postcode"]},"example":{"postcode":"RG10","region":"South England","dno_region":"SSE South","from":"2026-10-27T14:00Z","to":"2026-10-27T14:30Z","intensity_gco2_per_kwh":85,"intensity_index":"low","generation_mix":{"biomass":5.2,"coal":0,"imports":3.1,"gas":20,"nuclear":9.2,"other":0,"hydro":0,"solar":20,"wind":42.5}}}}},"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":"Carbon Intensity API unavailable or returned an error. Not charged."}}}},"/api/fx/{currency}":{"get":{"operationId":"fxReferenceRate","summary":"ECB Euro Reference Rate","description":"The latest ECB euro foreign exchange reference rate for a currency (units per 1 euro) and its date, unmodified, as JSON. The same data is available free of charge from the ECB website; reference rates are for information purposes only.","tags":["ECB Euro Reference Rate"],"parameters":[{"name":"currency","in":"path","required":true,"description":"ISO 4217 currency code, any case, for a currency the ECB publishes a reference rate for (about 30, such as USD, GBP, JPY, CHF). Not EUR: every rate is against the euro.","schema":{"type":"string","pattern":"^[A-Za-z]{3}$","example":"USD"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The currency code and name, the base (EUR), the reference rate as units of the currency per 1 euro, the date it applies to, and the ECB source and free-availability notice. Rates are published around 16:00 CET on working days.","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string"},"currency_name":{"type":["string","null"]},"base":{"type":"string","const":"EUR"},"rate":{"type":"number","description":"Units of the currency per 1 euro, as published by the ECB"},"date":{"type":"string","description":"YYYY-MM-DD, the reference date"},"notice":{"type":"string","description":"ECB source and free-availability notice"}},"required":["currency","base","rate","date","notice"]},"example":{"currency":"USD","currency_name":"US dollar","base":"EUR","rate":1.1188,"date":"2026-10-26","notice":"Source: ECB statistics (euro foreign exchange reference rates), unmodified. This data is available free of charge at https://www.ecb.europa.eu. Published by the ECB for information purposes only; not for transaction purposes."}}}},"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":"the ECB Data Portal unavailable or returned an error. Not charged."}}}},"/api/food-hygiene/{postcode}":{"get":{"operationId":"foodHygiene","summary":"UK Food Hygiene Ratings","description":"Food hygiene ratings for food businesses at a UK postcode from the Food Standards Agency: business name and type, address, rating and the date of the inspection it is based on, as JSON.","tags":["UK Food Hygiene Ratings"],"parameters":[{"name":"postcode","in":"path","required":true,"description":"Full UK postcode, with or without the space, any case.","schema":{"type":"string","pattern":"^[A-Za-z]{1,2}[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}$","example":"M11AE"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The postcode, the number of rated food businesses there, and for each: FSA id, business name and type, address, rating (0 to 5 or a status such as Exempt in England, Wales and Northern Ireland; Pass or Improvement Required in Scotland), the rating date, the scheme, whether a new rating is pending, the local authority and a link to its FSA page.","content":{"application/json":{"schema":{"type":"object","properties":{"postcode":{"type":"string"},"count":{"type":"integer"},"establishments":{"type":"array","items":{"type":"object","properties":{"fhrs_id":{"type":"integer"},"business_name":{"type":["string","null"]},"business_type":{"type":["string","null"]},"address":{"type":["string","null"],"description":"Withheld by the FSA for some premises, such as private homes"},"rating":{"type":["string","null"],"description":"0 to 5, Exempt, AwaitingInspection, Pass, Improvement Required, and others"},"rating_date":{"type":["string","null"],"description":"YYYY-MM-DD, the inspection the rating is based on"},"scheme":{"type":["string","null"],"description":"FHRS (England, Wales, Northern Ireland) or FHIS (Scotland)"},"new_rating_pending":{"type":["boolean","null"]},"local_authority":{"type":["string","null"]},"fsa_url":{"type":"string"}}}}},"required":["postcode","count","establishments"]},"example":{"postcode":"M1 1AE","count":1,"establishments":[{"fhrs_id":1894640,"business_name":"The Head of Steam Manchester - Northern Quarter","business_type":"Pub/bar/nightclub","address":"16 Newton Street, Manchester, M1 1AE","rating":"5","rating_date":"2026-04-24","scheme":"FHRS","new_rating_pending":false,"local_authority":"Manchester","fsa_url":"https://ratings.food.gov.uk/business/1894640"}]}}}},"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":"the FSA ratings API unavailable or returned an error. Not charged."}}}}}}