API Documentation
Integrate Address Data into your applications seamlessly.
Introduction
Welcome to the Address Data API. Our RESTful API provides robust endpoints for Nigerian address validation, lookup, autocompletion, and access to structured geographical and real estate data. Empower your applications with accurate and verified information.
All API requests must be authenticated. Please refer to the Authentication section below.
Authentication
To authenticate your API requests, include your Public Key in the X-Public-Key header and your Private Key in the X-Private-Key header. You can generate your API keys from the developer portal.
Authentication Example:
// Example: Fetching data with authentication headers
fetch('https://api.addressdata.ng/v1/address/lookup-by-code/ADC123XYZ', {
method: 'GET',
headers: {
'X-Public-Key': 'YOUR_PUBLIC_KEY',
'X-Private-Key': 'YOUR_PRIVATE_KEY',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));Rate Limits & Pricing
Get started with 500 free address lookups per day. This daily limit applies to endpoints like/autocomplete and /lookup-by-code.
Our standard pricing plan is designed to be simple and scalable:
- ₦20 per verified lookup after your free daily limit.
- Access to geographical data endpoints (
/states, etc.) is generally not counted towards lookup limits but may be subject to fair use policies.
Note: Detailed standard pricing plans and billing information will be available soon.
API Base URL
All API endpoints are relative to the following base URL:
https://api.addressdata.ng/v1
Address Endpoints
GET /autocomplete
Suggests verified Nigerian addresses based on partial user input. Ideal for checkout forms and registrations.
Query Parameters:
query(string, required): The partial address string to search for.
Example Request:
$ https://api.addressdata.ng/v1/autocomplete?query=123 Allen Ave IkejaExample Success Response (200 OK):
$ [
{
"adc": "ADC123XYZ",
"formattedAddress": "123 Allen Avenue, Ikeja, Lagos",
"streetAddress": "123 Allen Avenue",
"city": "Ikeja",
"lga": "Ikeja",
"state": "Lagos"
},
// ... other suggestions
]GET /lookup-by-code/{adc}
Fetches a full, verified address using its unique Address Data Code (ADC).
Path Parameters:
adc(string, required): The Address Data Code.
Example Request:
$ https://api.addressdata.ng/v1/lookup-by-code/ADC789ABCExample Success Response (200 OK):
$ {
"adc": "ADC12345XYZ", // Address Data Code
"streetAddress": "123 Main Street, XYZ Layout",
"areaDistrict": "Ikeja GRA",
"city": "Ikeja",
"lga": "Ikeja",
"state": "Lagos",
"zipCode": "100001",
"country": "Nigeria",
"latitude": 6.5244,
"longitude": 3.3792,
"status": "verified",
"googleMapsSuggestion": "123 Main St, Ikeja GRA, Ikeja, Lagos 100001, Nigeria"
}Estates Endpoints
GET /estates
Retrieves a list of all approved real estate properties.
Example Request:
$ https://api.addressdata.ng/v1/estatesExample Success Response (200 OK):
$ [
{
"estateCode": "LAG-ETI-BNN01",
"name": "Banana Island Estate",
"location": { "state": "Lagos", "lga": "Eti Osa" }
},
// ... other estates
]GET /estates/{estateCode}
Fetches a full, verified estate using its unique Estate Code.
Path Parameters:
estateCode(string, required): The unique Estate Code.
Example Request:
$ https://api.addressdata.ng/v1/estates/LAG-ETI-PRV02Example Success Response (200 OK):
$ {
"estateCode": "LAG-ETI-BNN01", // Unique Estate Code
"name": "Banana Island Estate",
"location": {
"state": "Lagos",
"lga": "Eti Osa",
"area": "Ikoyi"
},
"googleMapLink": "https://maps.app.goo.gl/u5B1gY8Jz9W7xXaP7",
"status": "approved"
}Geography Endpoints
GET /states
Lists all Nigerian states.
Example Request:
$ https://api.addressdata.ng/v1/statesExample Success Response (200 OK):
$ [
{ "name": "Abia", "capital": "Umuahia" },
{ "name": "Lagos", "capital": "Ikeja" },
// ... other states
]GET /states/{stateName}/lgas
Lists all Local Government Areas (LGAs) for a specified Nigerian state.
Path Parameters:
stateName(string, required): The name of the state (e.g., "Lagos"). Case-insensitive.
Example Request:
$ https://api.addressdata.ng/v1/states/Lagos/lgasExample Success Response (200 OK):
$ [
{ "name": "Agege" },
{ "name": "Ikeja" },
// ... other LGAs in Lagos
]GET /states/{stateName}/lga/{lgaName}/cities
Lists prominent cities/towns within a specified LGA of a state. (Note: City data granularity may vary).
Path Parameters:
stateName(string, required): The name of the state.lgaName(string, required): The name of the LGA.
Example Request:
$ https://api.addressdata.ng/v1/states/Lagos/lga/Ikeja/citiesExample Success Response (200 OK):
$ [
{ "name": "Ikeja" },
{ "name": "Oregun" },
// ... other cities/towns in Ikeja LGA
]Data Object Structures
Our API returns data in a structured JSON format. Developers are encouraged to replicate this structure for maximum compatibility.
Address Object
$ {
"adc": "ADC12345XYZ", // Address Data Code
"streetAddress": "123 Main Street, XYZ Layout",
"areaDistrict": "Ikeja GRA",
"city": "Ikeja",
"lga": "Ikeja",
"state": "Lagos",
"zipCode": "100001",
"country": "Nigeria",
"latitude": 6.5244,
"longitude": 3.3792,
"status": "verified",
"googleMapsSuggestion": "123 Main St, Ikeja GRA, Ikeja, Lagos 100001, Nigeria"
}Estate Object
$ {
"estateCode": "LAG-ETI-BNN01", // Unique Estate Code
"name": "Banana Island Estate",
"location": {
"state": "Lagos",
"lga": "Eti Osa",
"area": "Ikoyi"
},
"googleMapLink": "https://maps.app.goo.gl/u5B1gY8Jz9W7xXaP7",
"status": "approved"
}Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request.
200 OK: Request was successful.400 Bad Request: The request was malformed (e.g., missing required parameters). The response body may contain more details.401 Unauthorized: API key is missing or invalid.403 Forbidden: API key is valid but does not have permission for the requested resource.404 Not Found: The requested resource does not exist.429 Too Many Requests: You have exceeded your rate limit.500 Internal Server Error: Something went wrong on our end. Please try again later.
Error responses will typically include a JSON body with a message field explaining the error.
Need Help?
If you have any questions, encounter issues, or need assistance with integration, please visit our support page.
Go to Support