canonical: https://jentic.com/apis/ideal-postcodes.co.uk/ideal-postcodes

# Ideal Postcodes API

Jentic publishes the only available OpenAPI specification for Ideal Postcodes API, keeping it validated and agent-ready. Ideal Postcodes provides UK and international address lookup, autocomplete, and validation built on Royal Mail's Postcode Address File. The 26-endpoint API covers postcode-to-address resolution, type-as-you-go autocomplete, address cleansing, and email and phone validation, plus account management for keys, licensees, configs, and lookup history. Integrations rate-limit at 30 requests per second per IP and apply a per-key daily lookup ceiling tied to subscription. The community key 'iddqd' is provided for low-volume testing without onboarding.

## For AI agents

Look up UK and international addresses by postcode, autocomplete partial input, validate emails and phone numbers, and audit per-key lookup usage.

## Scope

Does not handle parcel rate calculation, postage label generation, or geocoding - use for UK and international address lookup, autocomplete, and validation only.

## Capabilities

- Resolve a UK postcode to a full set of deliverable addresses via /postcodes endpoints
- Autocomplete a typed address fragment for UK or USA via `/autocomplete/addresses/{address}/{country}`
- Cleanse and standardise a free-text address against the Royal Mail PAF via `/cleanse/addresses`
- Validate an email address through /emails for delivery-risk scoring
- Validate a phone number through /phone_numbers for line type and country
- Manage API keys, configs, licensees, and per-key lookup history through `/keys/{key}` routes
- Audit lookup usage through `/keys/{key}/usage` and `/keys/{key}/lookups` for billing and compliance

## Use cases

### Checkout Address Autocomplete

Reduce checkout abandonment by autocompleting addresses as customers type. The `/autocomplete/addresses/{address}/gbr` endpoint returns ranked suggestions in tens of milliseconds, then a single /addresses lookup resolves the chosen suggestion into a complete deliverable record. Integrations are typically live within a day because the autocomplete and lookup pair maps directly onto a standard checkout flow.

Example prompt: Call GET `/autocomplete/addresses/{partial}/gbr` for each keystroke, then on selection GET /addresses to resolve the full record

### Address Cleansing for CRM Imports

When importing leads or customers from a CSV, run each free-text address through `/cleanse/addresses` to produce a standardised PAF record with UDPRN. This avoids duplicate records and makes downstream geocoding and routing reliable. The endpoint returns confidence scores so agents can flag low-confidence rows for human review.

Example prompt: POST `/cleanse/addresses` with each row's free-text address and store the returned UDPRN and confidence score on the CRM record

### Pre-Send Email Validation

Before sending a transactional email, call /emails to confirm the address syntax and domain look deliverable. The endpoint returns a verdict and risk indicators so an agent can route low-risk addresses straight to send and quarantine high-risk ones for review or fallback channels.

Example prompt: Call GET /emails with the recipient address and only proceed with send when the response indicates a low-risk verdict

### AI Agent Onboarding Assistant

An onboarding agent uses Jentic to find Ideal Postcodes operations matching 'validate UK address', autocompletes the user's input, resolves the chosen suggestion, and validates phone and email - all in a single conversational turn. The agent removes the need for the user to fill multiple form fields manually.

Example prompt: Use Jentic search 'validate UK address' to load the Ideal Postcodes /addresses schema and execute it with the postcode the user provided

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/addresses` | Look up addresses by postcode or query |
| GET | `/autocomplete/addresses` | Autocomplete address suggestions |
| GET | `/autocomplete/addresses/{address}/gbr` | UK address autocomplete |
| GET | `/autocomplete/addresses/{address}/usa` | USA address autocomplete |
| POST | `/cleanse/addresses` | Cleanse a free-text address into a PAF record |
| GET | `/emails` | Validate an email address |
| GET | `/phone_numbers` | Validate a phone number |
| GET | `/keys/{key}/usage` | Retrieve API key usage statistics |

## Key resources

- **Address Search** — Postcode lookup and autocomplete for UK and USA addresses
- **Place Search** — Place-level lookups for non-address geographic queries
- **Keys** — Manage API keys, configs, lookup history, and usage
- **Licensees** — Manage sublicensee credentials for resold integrations
- **Configs** — Per-key configuration including allowed URLs and limits
- **Emails** — Email syntax and deliverability validation
- **Phone numbers** — Phone number line type and country validation

## Why Jentic

- **Setup:** Wiring the Ideal Postcodes API by hand means passing your key to authenticate address, email, and phone lookups and mapping its autocomplete and cleanse routes yourself. Through Jentic you install once, import the Ideal Postcodes API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** Ideal Postcodes takes the address query in query and body parameters rather than a resource path, so limit the agent to the operations it needs, such as address lookup, autocomplete, and validation. You choose that allowed set, so email or phone lookups are not included unless you add those operations.
- **Credential handling:** Your Ideal Postcodes API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'autocomplete a UK address' or 'validate a postcode', and Jentic returns the matching Ideal Postcodes operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Smarty US Autocomplete** — US-focused address autocomplete and validation alternative
- **AddressFinder API** — Australia and New Zealand address validation alternative
- **HERE Maps API** — Geocoding and routing pair with Ideal Postcodes' validated addresses

## FAQ

### Why is there no official OpenAPI spec for Ideal Postcodes API?

Ideal Postcodes does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Ideal Postcodes API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Ideal Postcodes API use?

The Ideal Postcodes API uses an API key passed either as the api_key query parameter or in the Authorization header using the api_key="..." scheme. Through Jentic, the key is stored encrypted in your Jentic One instance and injected at execution time. A community key 'iddqd' exists for low-volume testing with a 15 lookups per IP per day cap.

### Can I autocomplete UK addresses with the Ideal Postcodes API?

Yes. GET `/autocomplete/addresses/{partial}/gbr` returns ranked address suggestions for a partial input string, designed to fire on every keystroke during a UK checkout. After the user selects a suggestion, call GET /addresses to resolve the full deliverable record.

### What are the rate limits for the Ideal Postcodes API?

Each IP address is rate limited at 30 requests per second; tripping the limit returns a 503. The autocomplete endpoint has an additional rate limit and per-key daily lookup ceilings tied to your subscription. Build agents to back off on 503 and to batch where possible - for high-volume lookups contact Ideal Postcodes for a higher-limit endpoint.

### How do I look up a UK postcode through Jentic?

Run pip install jentic and import the SDK, then await client.search('validate UK address') to find the Ideal Postcodes /addresses operation. Load the schema and execute with the postcode parameter to receive every deliverable address. Run Jentic One, the self-hosted execution layer, for an API key.

### Is the Ideal Postcodes API free?

The community key 'iddqd' allows free trial use with a 15 lookups per IP per day limit. Production usage is paid per lookup with subscription tiers - pricing is on the Ideal Postcodes website. The OpenAPI spec describes only the request and response shapes; pricing is account-level.

### Can the API cleanse a messy free-text address?

Yes. POST `/cleanse/addresses` accepts a free-text address and returns a standardised PAF record with UDPRN, confidence score, and component fields. This is the recommended endpoint for CSV imports because it both validates and normalises in a single call.

### Can I limit what my agent is allowed to do with the Ideal Postcodes API?

Yes. Because you run Jentic One yourself, you decide which Ideal Postcodes operations the agent may call, so you can allow only address lookup via GET /addresses and autocomplete via GET `/autocomplete/addresses/{address}/gbr` while leaving out others. The API takes its query in query and body parameters rather than a resource path, so scoping is enforced at the operation level you permit, meaning email validation through GET /emails or phone validation through GET /phone_numbers is excluded unless you explicitly add those operations. Your API key is stored encrypted by your own instance and injected only for the operations you have allowed.
