GetTheData logo

APIs

GetTheData operate a number of free-to-access APIs, allowing access to open data, and/or data derived from open data.

Open Postcode Geo

Open Postcode Geo contains English, Scottish, and Welsh postcodes, and the location coordinates of the centre of the postcode, as both easting and northing pairs, and latitude and longitude pairs.

The data is also available as a downloadable file.

You can find more information on the Open Postcode Geo page.

An example request and response is shown below:

Request: https://api.getthedata.com/postcode/EH99+1SP

{
  "status": "match",
  "match_type": "unit_postcode",
  "input": "EH99 1SP",
  "data": {
    "postcode": "EH99 1SP",
    "status": "live",
    "usertype": "large",
    "easting": 326751,
    "northing": 673849,
    "positional_quality_indicator": 1,
    "country": "Scotland",
    "latitude": "55.952064",
    "longitude": "-3.174589",
    "postcode_no_space": "EH991SP",
    "postcode_fixed_width_seven": "EH991SP",
    "postcode_fixed_width_eight": "EH99 1SP",
    "postcode_area": "EH",
    "postcode_district": "EH99",
    "postcode_sector": "EH99 1",
    "outcode": "EH99",
    "incode": "1SP"
  },
  "copyright": [
    "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"
  ]
}

bng2latlong

bng2latlong converts easting and northing to latitude and longitude.

More precisely, the API takes an OSGB36 easting and northing (British National Grid) coordinate pair, and returns a WGS84 latitude and longitude coordinate pair.

You can find more information on the bng2latlong page.

An example request and response is shown below:

Request: https://api.getthedata.com/bng2latlong/319421/174588

{
  "status": "ok",
  "easting": 319421,
  "northing": 174588,
  "latitude": 51.4645,
  "longitude": -3.16134
}