Get up and running with our APIs in minutes. This guide will walk you through creating an API token, setting up authentication, and making your first postcode lookup request.
Generate your authentication credentials
Configure secure API access
Retrieve postcode and address data
Before you can access our APIs, you'll need to create an API token. This token acts as your digital key and proves your identity when making requests.
Go to your dashboard and access the token management section to create a new API token.
Click "Create New Token", provide a descriptive name, and copy the generated token. Store this securely - you won't be able to see it again!
Treat your API token like a password. Store it securely and never share it publicly. For production applications, consider using environment variables.
Now that you have an API token, you'll need to include it in your requests. Our API's use Bearer token authentication for secure API access.
Include your API token in the Authorization header of every request:
Here's how to make an authenticated request using cURL:
And here's the same request using JavaScript fetch:
For enhanced security, consider generating short-lived JWT tokens using the Security API instead of using your main dashboard token directly in production applications.
Now you're ready to make your first postcode lookup! Our API provides fast and accurate UK address data with optional coordinate information.
Select your dataset based on your accuracy, desired coverage, and cost requirements:
royal-mailOfficial, comprehensive dataset with highest accuracy
Here's a complete example using the royal-mail dataset to lookup postcode "SW1A 1AA":
The API returns structured address data with all matching addresses for the postcode:
Include latitude/longitude and grid reference data for mapping applications. You can request both fields together or individually:
You've successfully made your first postcode lookup! You can now integrate this into your application to provide address capture, validation, and location services.