REST API Overview

Modern JSON API for high-speed UK address lookups, postcode search, and geocoding services.

Base URL: https://wsp.epostcode.com/uk/v1/

Key Features

  • JSON Responses: Easy to parse and integrate
  • RESTful Design: Predictable resource-based URLs
  • High Performance: Optimized for speed and reliability
  • Real-time Data: Access to the latest UK PAF dataset
  • Comprehensive Geocoding: Latitude, longitude, UPRN, and UDPRN

Authentication

All REST API endpoints require authentication via an API key passed as a URL parameter.

URL Parameter
?key=YOUR_API_KEY_HERE
Get your API key: Sign up at the ePostcode Portal and navigate to the Manage Keys section.

API Key Security

The master key issued to you is for managing available credits and account administration only. It is not used for consuming the web services themselves.

  • Create API keys securely within your portal's Manage API Keys tab
  • Configure security restrictions (IP/domain whitelisting)
  • Set rate limiting to control usage
  • Never expose API keys in client-side code or public repositories

Retrieve Detailed Premise Data

GET /GetPremise

Get complete address details for a specific premise by ID.

Query Parameters

Parameter Type Required Description
key string Required Your API key (obtain from ePostcode Portal)
id string Required The ID of the premise to retrieve
uprn boolean Optional (default: false) If true, includes UPRN (deducts 1 extra credit)

Example Request

cURL
curl -X GET "https://wsp.epostcode.com/uk/v1/GetPremise?key=YOUR_API_KEY_HERE&id=52502003&uprn=true"

Example Response

JSON Response
{
  "item": {
    "id": "52502003",
    "domesticId": "52502003",
    "adminAreaName": "Renfrewshire",
    "barcode": "",
    "buildingName": "Merlin House",
    "buildingNumber": 20,
    "city": "Glasgow",
    "company": "Etellect Ltd",
    "countryIso2": "",
    "countryIso3": "",
    "countryIsoNumber": 0,
    "countryName": "Scotland",
    "district": "Hillington Park",
    "line1": "Merlin House",
    "line2": "20 Mossland Road",
    "line3": "",
    "line4": "",
    "line5": "",
    "poBox": "",
    "postalCode": "G52 4XZ",
    "province": "Renfrewshire",
    "secondaryStreet": "",
    "street": "Mossland Road",
    "subBuilding": "",
    "department": "",
    "lat": "55.863168",
    "long": "-4.379078",
    "uprn": "123105666",
    "udprn": "52502003"
  }
}
Note: Latitude and longitude are now included by default. Setting uprn=true includes the UPRN field. Setting uprn=true deducts 1 extra credit per request.

Retrieve Geodata for Premise

GET /GetPremiseGeoData

Retrieves geodata for a premise by its ID.

Query Parameters

Parameter Type Required Description
key string Required Your API key (obtain from ePostcode Portal)
id string Required The ID of the premise to retrieve

Example Request

cURL
curl -X GET "https://wsp.epostcode.com/uk/v1/GetPremiseGeoData?key=YOUR_API_KEY_HERE&id=52502003"

Example Response

JSON Response
{
  "item": {
    "id": "52502003",
    "lat": "55.863168",
    "long": "-4.379078",
    "uprn": "123105666",
    "udprn": "52502003"
  }
}

Check Remaining API Credits

GET /GetCredits

Monitor your available API credits in real-time.

Example Request

cURL
curl -X GET "https://wsp.epostcode.com/uk/v1/GetCredits?key=YOUR_API_KEY_HERE"

Example Response

JSON Response
{
  "credits": 29
}

API Versioning & Changelog

Track changes and updates to the ePostcode REST API.

Current Version: v1

Base URL: https://wsp.epostcode.com/uk/v1/

Changelog

February 2026

  • Breaking Change: Removed includeGeoData parameter from /GetPremise
  • Enhancement: Latitude and longitude (lat, long) now included by default in /GetPremise response
  • New Parameter: Added uprn boolean parameter to /GetPremise (default: false)
  • Credit Change: Setting uprn=true now deducts 1 extra credit per lookup (returns UPRN field)
  • Note: UDPRN continues to be included by default at no extra cost

May 2025

  • Added includeGeoData parameter to /GetPremise endpoint
  • Geodata (lat, long, UPRN, UDPRN) available when includeGeoData=true (1 extra credit)
Migration Guide: If you're currently using includeGeoData=true, update your code:
  • Latitude and longitude are now always included (no parameter needed)
  • To get UPRN, use uprn=true instead of includeGeoData=true
  • UDPRN is always included at no extra cost

Credit Usage Summary

Understand how API credits are consumed for different operations.

Endpoint Base Cost Additional Costs Notes
/Search 1 credit Per search request
/GetPremise 1 credit +1 if uprn=true Includes lat, long, udprn by default
/GetPremiseGeoData 1 credit Returns lat, long, uprn, udprn
/GetCredits 0 credits Free to check balance
Tip: Use the /GetCredits endpoint to monitor your usage and avoid service interruptions.

Need Help with Integration?

Our technical support team is here to help you integrate ePostcode into your application.

Email Support Developer Portal Contact Us