Authentication and request format
The base URL is https://autopostcode.com/api/public. Use HTTPS and send an active website key as x-api-key or Authorization: Bearer. Access follows the website and workspace billing status.
The legacy api-key header, plain Authorization value and api_key query parameter remain accepted. Keep keys out of URLs and use documented headers for new integrations. POST validation calls also accept query parameters, with JSON body values taking precedence.
Pass personal data in POST for validation. Optional provider fields can be null, absent or unavailable. No developer REST operation exposes cursor pagination.
Postcode lookup
GET /api/public/lookup
Fill a UK checkout or verify delivery point options from a full postcode.
Access — active website API key and eligible workspace billing.
A matched lookup costs 1 credit. A no-match lookup records an attempt and consumes no credit when billing access permits the request.
200 returns an array of address candidates sourced from Royal Mail PAF. Empty address fields are strings. 404 means there were no addresses. No cursor is supplied. The fallback dataset can return up to 100 results. Let the user choose a delivery point. Repeating a successful request can charge again.
postcode (required, or use documented alias). Full UK postcode. Spaces and case are normalised.
Possible status codes include 400, 401, 402, 403, 404, 500, 503.
Request
curl -sS --get 'https://autopostcode.com/api/public/lookup' --data-urlencode 'postcode=SW1A 1AA' -H "x-api-key: $AUTOPOSTCODE_API_KEY"JSON response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"postcode": {
"type": "string"
},
"company": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"line3": {
"type": "string"
},
"dependent_locality": {
"type": "string"
},
"town": {
"type": "string"
},
"county": {
"type": "string"
},
"country": {
"type": "string"
},
"line1_full": {
"type": "string"
},
"formatted_address": {
"type": "string"
}
},
"required": [
"postcode",
"company",
"line1",
"line2",
"line3",
"dependent_locality",
"town",
"county",
"country",
"line1_full",
"formatted_address"
]
}
}Illustrative response
[
{
"postcode": "SW1A 1AA",
"company": "",
"line1": "1 Example Street",
"line2": "",
"line3": "",
"dependent_locality": "",
"town": "LONDON",
"county": "Greater London",
"country": "United Kingdom",
"line1_full": "1 Example Street",
"formatted_address": "1 Example Street, LONDON, Greater London, SW1A 1AA"
}
]Address autocomplete
GET /api/public/autocomplete
Suggest UK addresses as the shopper types, then expand any returned group token.
Access — active website API key and eligible workspace billing.
1 credit for the first matched search in a session, with a rolling one-hour deduplication window. Short inputs and group expansion are free. An empty match set consumes no credit.
Use one session per address selection journey and reset when the shopper selects or clears the address. Without a client session, the server derives a 10-minute bucket from the key and visitor metadata. Debounce requests. Short or unsearchable input returns empty arrays. When credit fields are present they reflect settlement. Omitted values mean settlement was unavailable or did not apply. Group tokens expand results.
q (optional). Free text for initial search, minimum 3 characters. Alias: query. Omit when expanding a group.
group (optional). Opaque group token from the search response, maximum 512 characters. Takes precedence over q.
session (optional). Stable random ID for one search, up to 128 characters. Alias: session_id.
x-session-id (optional). Session identifier when neither query alias is supplied.
Possible status codes include 400, 401, 402, 403, 503.
Request
curl -sS --get 'https://autopostcode.com/api/public/autocomplete' --data-urlencode 'q=10 Downing' --data-urlencode "session=$AUTOPOSTCODE_SEARCH_ID" -H "x-api-key: $AUTOPOSTCODE_API_KEY"JSON response schema
{
"oneOf": [
{
"type": "object",
"properties": {
"query": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": 0
},
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"label": {
"type": "string"
},
"postcode": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": 0
}
},
"required": [
"token",
"label",
"postcode",
"count"
]
}
},
"suggestions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"postcode": {
"type": "string"
},
"company": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"line3": {
"type": "string"
},
"dependent_locality": {
"type": "string"
},
"town": {
"type": "string"
},
"county": {
"type": "string"
},
"country": {
"type": "string"
},
"line1_full": {
"type": "string"
},
"formatted_address": {
"type": "string"
},
"suggestion": {
"type": "string"
},
"label": {
"type": "string"
},
"raw": {
"type": "object",
"description": "Provider fields may vary. Use the normalised fields for display and storage."
}
},
"required": [
"postcode",
"company",
"line1",
"line2",
"line3",
"dependent_locality",
"town",
"county",
"country",
"line1_full",
"formatted_address",
"suggestion",
"label",
"raw"
]
}
},
"session": {
"type": "string"
},
"credits_charged": {
"type": "integer",
"minimum": 0
},
"credits_remaining": {
"type": "integer",
"minimum": 0
}
},
"required": [
"query",
"count",
"groups",
"suggestions"
]
},
{
"type": "object",
"properties": {
"group": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": 0
},
"suggestions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"postcode": {
"type": "string"
},
"company": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"line3": {
"type": "string"
},
"dependent_locality": {
"type": "string"
},
"town": {
"type": "string"
},
"county": {
"type": "string"
},
"country": {
"type": "string"
},
"line1_full": {
"type": "string"
},
"formatted_address": {
"type": "string"
},
"suggestion": {
"type": "string"
},
"label": {
"type": "string"
},
"raw": {
"type": "object",
"description": "Provider fields may vary. Use the normalised fields for display and storage."
}
},
"required": [
"postcode",
"company",
"line1",
"line2",
"line3",
"dependent_locality",
"town",
"county",
"country",
"line1_full",
"formatted_address",
"suggestion",
"label",
"raw"
]
}
}
},
"required": [
"group",
"count",
"suggestions"
]
}
]
}Illustrative response
{
"query": "SW",
"count": 0,
"suggestions": [],
"groups": [],
"credits_charged": 0
}Record address selection
POST /api/public/select
Record the shopper's deliberate address selection for website analytics.
Access — active website API key and eligible workspace billing.
No credit charge. Billing access still applies.
Creates a selection analytics event. Submit once after a real selection. Use optional customer details only when authorised and necessary. Replays can create duplicate events.
Possible status codes include 400, 401, 402, 403, 500, 503.
Request
curl -sS 'https://autopostcode.com/api/public/select' -H "x-api-key: $AUTOPOSTCODE_API_KEY" -H 'content-type: application/json' --data '{"postcode":"SW1A 1AA"}'JSON request schema
{
"type": "object",
"properties": {
"postcode": {
"type": "string",
"description": "Postcode originally searched."
},
"selected_postcode": {
"type": "string",
"description": "Postcode of the selected option."
},
"selected_address": {
"type": "object",
"description": "Selected address. Send the minimum supported fields."
},
"contact_name": {
"type": "string"
},
"contact_email": {
"type": "string"
},
"contact_phone": {
"type": "string"
}
},
"required": [
"postcode"
]
}JSON response schema
{
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": [
"ok"
]
}Illustrative response
{
"ok": true
}Email validation
GET or POST /api/public/validate-email
Check address syntax and a mailbox verdict when NeverBounce is available.
Access — active website API key and eligible workspace billing.
1 credit for a local syntax rejection or provider verdict. Provider errors and unconfigured outcomes are free.
Prefer POST for personal data. Treat unknown as unresolved and risky as a request for review. A provider result does not guarantee delivery. Repeats can charge again.
email (required, or use documented alias). Email to check, up to 320 characters.
Possible status codes include 400, 401, 402, 403, 500, 503.
Request
curl -sS 'https://autopostcode.com/api/public/validate-email' -H "x-api-key: $AUTOPOSTCODE_API_KEY" -H 'content-type: application/json' --data '{"email":"example@example.com"}'JSON request schema
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Email to check, up to 320 characters."
}
},
"required": []
}JSON response schema
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"verdict": {
"type": "string",
"enum": [
"valid",
"invalid",
"risky",
"unknown"
]
},
"result": {
"type": "string"
},
"flags": {
"type": "array",
"items": {
"type": "string"
}
},
"suggested_correction": {
"type": [
"string",
"null"
]
},
"credits_used": {
"type": "integer",
"minimum": 0
},
"credits_remaining": {
"type": "integer",
"minimum": 0
}
},
"required": [
"email",
"verdict",
"result",
"flags",
"suggested_correction",
"credits_used",
"credits_remaining"
]
}Illustrative response
{
"email": "example@example.com",
"verdict": "unknown",
"result": "unknown",
"flags": [
"provider_not_configured"
],
"suggested_correction": null,
"credits_used": 0,
"credits_remaining": 42
}Phone validation
GET or POST /api/public/validate-phone
Check phone format or request live HLR connectivity for an eligible number.
Access — active website API key and eligible workspace billing.
1 credit for format, 2 total when live HLR is performed and the provider reports no error.
valid describes formatting. verdict may also reflect an ABSENT HLR result. live=null means no HLR result was requested or attempted. unavailable denotes a provider issue. Unknown connectivity does not verify reachability. Repeats can charge again.
phone (required, or use documented alias). Phone number, up to 40 characters. Preserve its leading zero or + prefix.
country (optional). ISO two-letter parsing region for national numbers. Defaults to GB.
live (optional). Enable HLR for eligible numbers. Use true or 1.
Possible status codes include 400, 401, 402, 403, 500, 503.
Request
curl -sS 'https://autopostcode.com/api/public/validate-phone' -H "x-api-key: $AUTOPOSTCODE_API_KEY" -H 'content-type: application/json' --data '{"phone":"bad-format","country":"GB"}'JSON request schema
{
"type": "object",
"properties": {
"phone": {
"type": "string",
"description": "Phone number, up to 40 characters. Preserve its leading zero or + prefix."
},
"country": {
"type": "string",
"description": "ISO two-letter parsing region for national numbers. Defaults to GB."
},
"live": {
"description": "Enable HLR for eligible numbers. Use true or 1.",
"oneOf": [
{
"type": "boolean"
},
{
"type": "string",
"enum": [
"true",
"false",
"1",
"0"
]
}
]
}
},
"required": []
}JSON response schema
{
"type": "object",
"properties": {
"phone": {
"type": "string"
},
"valid": {
"type": "boolean"
},
"verdict": {
"type": "string",
"enum": [
"valid",
"invalid"
]
},
"country": {
"type": [
"string",
"null"
]
},
"line_type": {
"type": [
"string",
"null"
]
},
"national_format": {
"type": [
"string",
"null"
]
},
"international_format": {
"type": [
"string",
"null"
]
},
"live": {
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"connectivity": {
"type": "string"
},
"carrier": {
"type": [
"string",
"null"
]
},
"ported": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"connectivity",
"carrier",
"ported"
]
},
{
"type": "object",
"properties": {
"connectivity": {
"type": "string",
"enum": [
"unavailable"
]
}
},
"required": [
"connectivity"
]
}
]
},
"credits_used": {
"type": "integer",
"minimum": 0
},
"credits_remaining": {
"type": "integer",
"minimum": 0
}
},
"required": [
"phone",
"valid",
"verdict",
"country",
"line_type",
"national_format",
"international_format",
"live",
"credits_used",
"credits_remaining"
]
}Illustrative response
{
"phone": "bad-format",
"valid": false,
"verdict": "invalid",
"country": null,
"line_type": null,
"national_format": null,
"international_format": null,
"live": null,
"credits_used": 1,
"credits_remaining": 41
}UK bank account validation
GET or POST /api/public/validate-bank
Check UK sort code and account number format with modulus checking, or attempt Confirmation of Payee.
Access — active website API key and eligible workspace billing.
1 credit for modulus, 10 total when CoP returns an available match outcome.
Use POST and keep leading zeroes. The offline check applies available modulus rules. Even a valid result cannot verify that the account exists or belongs to the named person. Review partial and unavailable CoP outcomes before deciding what to do. This operation does not initiate payment. Repeats can charge again.
sort_code (required, or use documented alias). UK sort code. Alias: sortcode.
account_number (required, or use documented alias). Account number as a string. Alias: account.
name (optional). Account holder name, required to attempt CoP.
cop (optional). Enable Confirmation of Payee. Use true or 1.
type (optional). Defaults to personal.
Possible status codes include 400, 401, 402, 403, 500, 503.
Request
curl -sS 'https://autopostcode.com/api/public/validate-bank' -H "x-api-key: $AUTOPOSTCODE_API_KEY" -H 'content-type: application/json' --data '{"sort_code":"00-00","account_number":"0000"}'JSON request schema
{
"type": "object",
"properties": {
"sort_code": {
"type": "string",
"description": "UK sort code. Alias: sortcode."
},
"account_number": {
"type": "string",
"description": "Account number as a string. Alias: account."
},
"name": {
"type": "string",
"description": "Account holder name, required to attempt CoP."
},
"cop": {
"description": "Enable Confirmation of Payee. Use true or 1.",
"oneOf": [
{
"type": "boolean"
},
{
"type": "string",
"enum": [
"true",
"false",
"1",
"0"
]
}
]
},
"type": {
"type": "string",
"enum": [
"personal",
"business"
],
"description": "Defaults to personal."
},
"sortcode": {
"type": "string",
"description": "Alias for sort_code."
},
"account": {
"type": "string",
"description": "Alias for account_number."
}
},
"required": []
}JSON response schema
{
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"verdict": {
"type": "string",
"enum": [
"valid",
"invalid",
"name_mismatch"
]
},
"sort_code": {
"type": "string"
},
"account_number": {
"type": "string"
},
"confirmation_of_payee": {
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"match": {
"type": "string",
"enum": [
"match",
"partial",
"no_match"
]
},
"account_name": {
"type": [
"string",
"null"
]
}
},
"required": [
"match",
"account_name"
]
},
{
"type": "object",
"properties": {
"match": {
"type": "string",
"enum": [
"unavailable"
]
}
},
"required": [
"match"
]
}
]
},
"credits_used": {
"type": "integer",
"minimum": 0
},
"credits_remaining": {
"type": "integer",
"minimum": 0
}
},
"required": [
"valid",
"verdict",
"sort_code",
"account_number",
"confirmation_of_payee",
"credits_used",
"credits_remaining"
]
}Illustrative response
{
"valid": false,
"verdict": "invalid",
"sort_code": "0000",
"account_number": "0000",
"confirmation_of_payee": null,
"credits_used": 1,
"credits_remaining": 40
}Product and pricing facts
GET /api/public/facts
Understand data coverage, integrations, published pricing and available documentation.
Access — anonymous.
Free. No key required.
Returns public facts only. No account usage, customer records or address rows. No pagination or writes.
Request
curl -sS 'https://autopostcode.com/api/public/facts'JSON response schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"summary": {
"type": "string"
},
"data_source": {
"type": "string"
},
"response_time": {
"type": "string"
},
"coverage": {
"type": "object",
"properties": {
"addresses": {
"type": "string"
},
"postcodes": {
"type": "string"
},
"region": {
"type": "string"
}
},
"required": [
"addresses",
"postcodes",
"region"
]
},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"endpoint": {
"type": "string"
}
},
"required": [
"code",
"name",
"description",
"endpoint"
]
}
},
"billing": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"autocomplete_rule": {
"type": "string"
},
"trial_days": {
"type": "integer",
"minimum": 0
},
"annual_discount_pct": {
"type": "integer",
"minimum": 0
},
"currency": {
"type": "string"
},
"vat": {
"type": "string"
},
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"monthly_price_gbp": {
"type": "number"
},
"monthly_lookups": {
"type": "integer",
"minimum": 0
},
"per_lookup_gbp": {
"type": [
"number",
"null"
]
}
},
"required": [
"name",
"monthly_price_gbp",
"monthly_lookups",
"per_lookup_gbp"
]
}
},
"credit_packs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"price_gbp": {
"type": "number"
},
"credits": {
"type": "integer",
"minimum": 0
}
},
"required": [
"name",
"price_gbp",
"credits"
]
}
}
},
"required": [
"unit",
"autocomplete_rule",
"trial_days",
"annual_discount_pct",
"currency",
"vat",
"plans",
"credit_packs"
]
},
"price_beat_guarantee": {
"type": "string"
},
"wordpress_plugin": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"download": {
"type": "string"
},
"platforms": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"download",
"platforms"
]
},
"developer": {
"type": "object",
"properties": {
"openapi": {
"type": "string"
},
"docs": {
"type": "string"
},
"markdown": {
"type": "string"
},
"mcp": {
"type": "string"
},
"auth": {
"type": "string"
}
},
"required": [
"openapi",
"docs",
"markdown",
"mcp",
"auth"
]
},
"contact": {
"type": "string"
}
},
"required": [
"name",
"url",
"summary",
"data_source",
"response_time",
"coverage",
"products",
"billing",
"price_beat_guarantee",
"wordpress_plugin",
"developer",
"contact"
]
}