Zameen Location Autocomplete API Find locations by a search text of 2 or more characters. Each result has a name, an Urdu name, a slug, a level (0 country, 2 city, deeper levels are areas and phases), the number of listings, the position and the full hierarchy. Send the slug as the location parameter of the search endpoint. Send the slug of a city as the city parameter to search only inside that city. Results are ordered by match and by number of listings.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
1 required parameter needed before sending a request.
2 optional filters available.
string
Required
Search text, 2 to 100 characters, e.g. dha ph. Matches area, phase and city names.
coffee shops
string
Optional
Optional. Search only inside one city or area. Use the slug of a result, e.g. /Lahore-1.
example
integer
Optional
Rows to return, 1 to 20 (default 8).
10
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"query": "dha ph",
"results": [
{
"id": "1450",
"name": "DHA Phase 7",
"path": "DHA Phase 7 DHA Defence Lahore Punjab Pakistan",
"slug": "/Lahore_Defence__DHA__Phase_7-1450",
"level": 4,
"name_ur": "\u0688\u06cc \u0627\u06cc\u0686 \u0627\u06d2 \u0641\u06cc\u0632 7",
"latitude": 31.484893,
"hierarchy": [
{
"id": "1521",
"name": "Pakistan",
"slug": "/Pakistan-1521",
"level": 0,
"name_ur": "\u067e\u0627\u06a9\u0633\u062a\u0627\u0646"
},
{
"id": "1522",
"name": "Punjab",
"slug": "/Punjab-1522",
"level": 1,
"name_ur": "\u067e\u0646\u062c\u0627\u0628"
},
{
"id": "1",
"name": "Lahore",
"slug": "/Lahore-1",
"level": 2,
"name_ur": "\u0644\u0627\u06c1\u0648\u0631"
},
{
"id": "9",
"name": "DHA Defence",
"slug": "/Lahore_DHA_Defence-9",
"level": 3,
"name_ur": "\u0688\u06cc \u0627\u06cc\u0686 \u0627\u06d2 \u0688\u06cc\u0641\u06cc\u0646\u0633"
},
{
"id": "1450",
"name": "DHA Phase 7",
"slug": "/Lahore_Defence__DHA__Phase_7-1450",
"level": 4,
"name_ur": "\u0688\u06cc \u0627\u06cc\u0686 \u0627\u06d2 \u0641\u06cc\u0632 7"
}
],
"longitude": 74.472342,
"has_children": true,
"listing_count": 17604
},
{
"id": "1485",
"name": "DHA Phase 8",
"path": "DHA Phase 8 DHA Defence Karachi Sindh Pakistan",
"slug": "/Karachi_D.H.A_Phase_8-1485",
"level": 4,
"name_ur": "\u0688\u06cc \u0627\u06cc\u0686 \u0627\u06d2 \u0641\u06cc\u0632 8",
"latitude": 24.77235659,
"hierarchy": [
{
"id": "1521",
"name": "Pakistan",
"slug": "/Pakistan-1521",
"level": 0,
"name_ur": "\u067e\u0627\u06a9\u0633\u062a\u0627\u0646"
},
{
"id": "1523",
"name": "Sindh",
"slug": "/Sindh-1523",
"level": 1,
"name_ur": "\u0633\u0646\u062f\u06be"
},
{
"id": "2",
"name": "Karachi",
"slug": "/Karachi-2",
"level": 2,
"name_ur": "\u06a9\u0631\u0627\u0686\u06cc"
},
{
"id": "213",
"name": "DHA Defence",
"slug": "/Karachi_DHA_Defence-213",
"level": 3,
"name_ur": "\u0688\u06cc \u0627\u06cc\u0686 \u0627\u06d2 \u0688\u06cc\u0641\u06cc\u0646\u0633"
},
{
"id": "1485",
"name": "DHA Phase 8",
"slug": "/Karachi_D.H.A_Phase_8-1485",
"level": 4,
"name_ur": "\u0688\u06cc \u0627\u06cc\u0686 \u0627\u06d2 \u0641\u06cc\u0632 8"
}
],
"longitude": 67.08148313,
"has_children": true,
"listing_count": 16188
}
]
},
"meta": {
"billable": true,
"endpoint_family": "autocomplete"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A required parameter is missing or invalid. This response is not billable.
{
"errors": {
"query": [
"The search text needs at least 2 characters."
]
},
"message": "The request validation failed"
}Temporarily Unavailable
Zameen did not answer or refused the request after several attempts. This response is not billable. Retry after a short pause.
{
"meta": {
"attempts": 1,
"billable": false,
"retryable": true
},
"error": {
"message": "Zameen data is temporarily unavailable. Please retry.",
"failure_type": "upstream_unavailable"
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.