Ideal postcodes api integration
Skill ideal-postcodes/skills/skills/ideal-postcodes-api-integration
Use when integrating the Ideal Postcodes API directly via HTTP. Covers authentication (header + query forms), the core lookup endpoints (postcodes, autocomplete, places, cleanse), key/licensee/config admin, data models (PafAddress, MrAddress, AddressSuggestion, etc.), error codes, rate limits, and common gotchas around CORS and allowed URLs.From its SKILL.md
npx -y skills add ideal-postcodes/skills --skill ideal-postcodes-api-integrationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as SEE LICENSE IN LICENSE. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.1 KB, as published. Nobody here has run it
Ideal Postcodes API
Direct HTTP integration with the Ideal Postcodes API. Supports multiple client libraries and language SDKs.
Quick Start (fetch)
const key = process.env.IDEAL_POSTCODES_API_KEY;
const response = await fetch(
'https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A1AA',
{
headers: {
Authorization: `api_key="${key}"`,
},
}
);
const data = await response.json();
console.log(data.result); // Array of addresses
Alternatively, pass ?api_key=... in the query string.
Quick Start (axios)
import axios from 'axios';
const client = axios.create({
baseURL: 'https://api.ideal-postcodes.co.uk/v1',
headers: {
Authorization: `api_key="${process.env.IDEAL_POSTCODES_API_KEY}"`,
},
});
const { data } = await client.get('/postcodes/SW1A1AA');
console.log(data.result);
Core Endpoints
GET /postcodes/{postcode}— Lookup all addresses for a UK postcodeGET /autocomplete/addresses— Typeahead address searchGET /autocomplete/addresses/{address}/gbr— Resolve a UK autocomplete suggestionGET /places/GET /places/{place}— Place search and resolvePOST /cleanse/addresses— Cleanse a freeform address stringGET /emails,GET /phone_numbers— Email and phone validation
See endpoints/ for the full list (23 operations).
Critical Gotchas
- Auth header format —
Authorization: api_key="<your-key>"(with double quotes around the key). NotBearer, notApiKey <key>. Query-string?api_key=...also works - API key restrictions — default keys are restricted to specific domains. Ensure your domain is in the key's allowed list
- CORS in browsers — the API sets CORS headers for
http://localhostin development. Production domains must be explicitly added to your key - Rate limits — each IP is rate limited at 30 requests per second. Tripping the limit returns a 503
- Error responses — all errors are JSON with a numeric
codeand human-readablemessage. Check codes before retrying — seeerror-codes.md
Reference Layout
authentication.md— header and query auth, key restrictionserror-codes.md— error code catalogue with fixesendpoints/— one reference per API operation (parameters, request body, response schema, examples, status codes)data/— one reference per data model (PafAddress, MrAddress, AddressSuggestion, etc.) with field tables and "used by" cross-links
Full Spec
The complete OpenAPI spec is available at:
- npm:
@ideal-postcodes/openapi - web: https://openapi.ideal-postcodes.co.uk/openapi.yaml
Reach for it when you need exhaustive parameter detail beyond what's in the endpoint references.
Full documentation
The full Ideal Postcodes documentation — every guide, API reference, and integration — is available as a single file at llms.txt. Point your agent there for anything this skill doesn't cover.