ParseForge Scrapers

UK Postcodes Scraper

parseforge/uk-postcodes-io-scraper

Developer toolsLead generationOther

Scrapes UK postcode data from Postcodes.io by list, partial search, or reverse geocoding. Returns each match as a flat row with address, ward, constituency, and coordinates.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
88
Bookmarked
0
Rating
Not rated yet
Last modified
12 days ago

Overview

ParseForge

UK Postcodes Scraper

Scrape UK postcode data for any list, partial search, or coordinate radius, up to a million per run. Each result returns the full address, ward, constituency, and precise latitude and longitude. No API key required. Export to CSV, JSON, Excel, or XML.

The UK's postcode system is the key to location data, but official sources like the ONS or Royal Mail often require licensing, bulk downloads, or complex APIs. This Actor queries the public Postcodes.io service directly, letting you look up full address details by postcode list, search by partial code, or reverse geocode a coordinate. You get a clean, flat dataset of administrative geographies and coordinates for every match.

Who uses it What they scrape UK Postcodes for
E-commerce logistics managers Validate and standardize delivery addresses against the official postcode database.
Real estate analysts Map property listings to precise local authority wards and parliamentary constituencies.
Market researchers Build geographic segments by converting a list of customer postcodes into coordinates and regions.
Public sector planners Aggregate service demand by ward or constituency from a raw list of user postcodes.

What it does

This Actor collects UK postcode data by list, partial search, or reverse geocoding and returns each match as a flat row with address, ward, constituency, and coordinates.

  • ๐Ÿ“ฎ Bulk postcode lookup: Paste a list of full postcodes and get the complete address, ward, constituency, and coordinates for each one.
  • ๐Ÿ” Partial postcode search: Enter an outward code like 'EC1A' to discover all matching full postcodes in that district.
  • ๐Ÿ“ Reverse geocoding: Provide a latitude, longitude, and radius in meters to find all postcodes within that circle.
  • ๐Ÿ—‚๏ธ Fixed flat schema: Every result arrives in a consistent row format, ready for direct import into spreadsheets or databases.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with UK Postcodes data

๐Ÿ“ฎ Validate a customer address list.

An online retailer uploads 50,000 delivery postcodes to confirm each one exists and to append the correct county and local authority for shipping tax rules.

๐Ÿ—ณ๏ธ Map constituents to their wards.

A political campaign feeds a list of supporter postcodes into the Actor to assign each one to the correct parliamentary constituency and electoral ward for canvassing.

๐Ÿ“ Find all postcodes near a new store.

A retail planner enters the latitude and longitude of a proposed site with a 1000-meter radius to extract every postcode in the catchment area for demographic analysis.

๐Ÿ” Complete a partial postcode for an address form.

A SaaS product uses the partial search mode to offer an autocomplete lookup when a user types an outward code like 'OX1', returning all valid full postcodes in that district.

Why choose this scraper

What you get
No API key or registration Queries the public Postcodes.io service with no authentication required.
Three lookup modes Works from a list of postcodes, a partial search, or a latitude and longitude.
Rich administrative data Returns ward, constituency, parish, and European electoral region alongside the address.
Precise coordinates Every postcode comes with its official latitude and longitude.
Large scale ready Collect up to a million postcodes in a single run.

How it compares

No other Store actor targets UK Postcodes the same way, so the honest comparison is with the alternatives teams actually weigh.

UK Postcodes Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When UK Postcodes changes Maintained for you You fix it You re-learn the page
Proxies, retries, anti-bot Built in Your problem Browser only
Output Fixed JSON schema, CSV/Excel export Whatever you build Copy-paste
Cost Pay per result Engineering time Analyst hours

Configure the run

Drive the Actor from a list of postcodes, a partial search query, or a coordinate and radius, and set a hard limit on the total number of postcodes collected per run. The Input tab lists every parameter.

A first run with the defaults:

{
  "postcodes": [
    "OX1 1DP",
    "M1 1AE",
    "GU1 3UW",
    "CF10 1EP",
    "EH1 1RE"
  ],
  "radiusMeters": 1000,
  "maxItems": 10
}

A larger pull:

{
  "postcodes": [
    "OX1 1DP",
    "M1 1AE",
    "GU1 3UW",
    "CF10 1EP",
    "EH1 1RE"
  ],
  "radiusMeters": 1000,
  "maxItems": 200
}

Pricing

Pay-per-result: $0.011 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $1.10
1,000 results $11.00
10,000 results $110.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the UK Postcodes Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to UK Postcodes through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/uk-postcodes-io-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that you have filled in exactly one input mode: either the postcode list, the partial search query, or the coordinate pair. If multiple modes are filled, the Actor uses the postcode list first. Also verify your postcode format is valid.

The Actor is running slowly with a large list.

The public Postcodes.io service processes requests one at a time. For lists over 10,000 postcodes, expect the run to take a while. Use the 'Maximum postcodes' limit to test a smaller sample first.

I get an error when using reverse geocoding.

Ensure both latitude and longitude are provided as decimal numbers and that the radius is between 1 and 2000 meters. The coordinate must be within the UK to return postcodes.

Some postcodes in my list return an error.

The Postcodes.io service may return a 404 for terminated or invalid postcodes. The Actor logs these and continues with the next item. Check the run log for details on which postcodes failed.

FAQ

Question Answer
What is the data source for this Actor? It calls the public Postcodes.io API, which is a free and open service that mirrors the official UK postcode data without requiring a license key.
Can I look up a single postcode? Yes. Paste one postcode into the list field and run the Actor. It will return the full address, ward, constituency, and coordinates for that single code.
How do I search for postcodes by area? Leave the postcode list empty and use the 'Postcode' search field. Enter a partial outward code like 'M1' to get all matching full postcodes in that district.
How does reverse geocoding work? Leave the list and search fields empty, then enter a latitude, longitude, and radius in meters. The Actor will return every postcode whose center point falls within that circle.
What is the maximum search radius? The radius for reverse geocoding is capped at 2000 meters. This is a limit of the underlying Postcodes.io service.
Does this Actor return the full address? Yes. Each result includes the administrative district, county, ward, parish, and parliamentary constituency, along with the postcode and its coordinates.
Can I get Northern Ireland postcodes? Yes, the Postcodes.io service covers the entire United Kingdom, including Northern Ireland, Scotland, Wales, and England.
Is there a rate limit? The public Postcodes.io service has usage limits. This Actor processes requests sequentially to stay within acceptable bounds, but very large bulk runs may take time.
What format is the data exported in? You can export your results in CSV, JSON, Excel, or XML directly from the Apify dataset tab after the run completes.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Postcodes.io. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
postcodes array UK postcodes to look up, one per line, for example 'OX1 1DP'. Spacing is not important. This is the main mode. ["OX1 1DP","M1 1AE","GU1 3UW","CF10 1EP"
query string Partial postcode to search, for example 'EC1A'. Returns matching postcodes. Used only when the postcode list is empty. not set
latitude string Center latitude for reverse geocoding, for example 51.5010. Used with longitude when the list and search are empty. not set
longitude string Center longitude for reverse geocoding, for example -0.1416. not set
radiusMeters integer Search radius for reverse geocoding, in meters. Maximum 2000. 1000
maxItems integer How many postcodes to collect per run. 10

Pricing

from $9.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.009 to $0.011

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~uk-postcodes-io-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "postcodes": [
      "OX1 1DP",
      "M1 1AE",
      "GU1 3UW"
    ],
    "maxItems": 3
  }'

Examples

Input that runs as-is.

input.json
{
  "postcodes": [
    "OX1 1DP",
    "M1 1AE",
    "GU1 3UW"
  ],
  "maxItems": 3
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run UK Postcodes Scraper on Apify All scrapers