GetTheData

App · 2 actions

Work with UK locations using GetTheData's free APIs: convert a British National Grid easting and northing to latitude and longitude, and look up English, Scottish and Welsh postcodes for their coordinates and parts. No account or API key required.

Convert grid reference to latitude and longitude

Convert a British National Grid (OSGB36) easting and northing, as used by Ordnance Survey and many UK datasets, to a WGS84 (GPS) latitude and longitude for maps and other apps. No API key required.

Inputs

EastingeastingnumberRequired
Metres east of the grid's origin, 0 to 700,000. Decimals are rounded to the nearest metre.From 0 to 700000.
NorthingnorthingnumberRequired
Metres north of the grid's origin, 0 to 1,300,000. Decimals are rounded to the nearest metre.From 0 to 1300000.

Outputs

eastingnumber
The easting that was converted, in whole metres, e.g. 529090.
latitudenumber
The WGS84 (GPS) latitude, e.g. 51.50101.
longitudenumber
The WGS84 (GPS) longitude, e.g. -0.14158.
northingnumber
The northing that was converted, in whole metres, e.g. 179645.
summarytext
One line with the conversion, e.g. 'Easting 529090, northing 179645 is latitude 51.50101, longitude -0.14158'.
Example output
{
  "easting": 529090,
  "latitude": 51.50101,
  "longitude": -0.14158,
  "northing": 179645,
  "summary": "Easting 529090, northing 179645 is latitude 51.50101, longitude -0.14158"
}

Look up postcode

Look up an English, Scottish or Welsh postcode in Open Postcode Geo and get its latitude and longitude, grid reference, country, whether it is still in use, and its area, district, sector, outcode and incode. A postcode sector ('SW1A 1'), district ('SW1A') or area ('SW') works too. Unknown postcodes come back with 'found' set to false. No API key required.

Inputs

PostcodepostcodetextRequired
A UK postcode such as 'SW1A 1AA' (any spacing or case), or a postcode sector, district or area. Northern Irish postcodes are not included.

Outputs

attributionlist
The copyright statements Open Postcode Geo's licence asks you to show wherever you use the data.
countrytext
'England', 'Scotland' or 'Wales'.
eastingnumber
The British National Grid easting of the centre, in metres.
foundtrue/false
True when Open Postcode Geo holds it. False for an unknown postcode and for every Northern Irish one (its licence excludes them); 'message' then says why.
incodetext
The part after the space, e.g. '1AA'.
latitudenumber
The latitude of the postcode's centre, e.g. 51.501009.
longitudenumber
The longitude of the postcode's centre, e.g. -0.141588.
match_typetext
What matched: 'unit_postcode' (a full postcode), 'postcode_sector', 'postcode_district' or 'postcode_area'. Only a full postcode has coordinates.
messagetext
Why nothing matched, e.g. 'No matching postcode found.'. Empty when found.
northingnumber
The British National Grid northing of the centre, in metres.
outcodetext
The part before the space, e.g. 'SW1A'.
positional_qualitynumber
How precise the location is, from 1 (within the building of a matched address) to 9 (no location available).
postcodetext
The full postcode, e.g. 'SW1A 1AA'.
postcode_areatext
The postcode area, its first one or two letters, e.g. 'SW'.
postcode_districttext
The postcode district, e.g. 'SW1A'.
postcode_no_spacetext
The postcode without its space, e.g. 'SW1A1AA'.
postcode_sectortext
The postcode sector, e.g. 'SW1A 1'.
querytext
What was looked up, tidied, e.g. 'SW1A 1AA'.
statustext
'live', or 'terminated' for a postcode no longer in use.
summarytext
One line about the match, e.g. 'SW1A 1AA is a live postcode in England (51.501009, -0.141588)', or why nothing matched.
usertypetext
'small' for an ordinary postcode, or 'large' for one given to a single big mail recipient (which may not be at that location).
Example output
{
  "attribution": [
    "Contains OS data (c) Crown copyright and database right 2026",
    "Contains Royal Mail data (c) Royal Mail copyright and database right 2026",
    "Contains National Statistics data (c) Crown copyright and database right 2026"
  ],
  "country": "England",
  "easting": 529090,
  "found": true,
  "incode": "1AA",
  "latitude": 51.501009,
  "longitude": -0.141588,
  "match_type": "unit_postcode",
  "message": null,
  "northing": 179645,
  "outcode": "SW1A",
  "positional_quality": 1,
  "postcode": "SW1A 1AA",
  "postcode_area": "SW",
  "postcode_district": "SW1A",
  "postcode_no_space": "SW1A1AA",
  "postcode_sector": "SW1A 1",
  "query": "SW1A 1AA",
  "status": "live",
  "summary": "SW1A 1AA is a live postcode in England (51.501009, -0.141588)",
  "usertype": "large"
}

On this page