/v1/streets
Search Streets
Search for streets within a state and municipality. Optionally filter by locality and street name. Returns paginated results ordered by name.
Query Parameters
| Param | Type | Description |
|---|---|---|
| state_code | string | INEGI state code (required). E.g. 09 |
| municipality_code | string | INEGI municipality code (required). E.g. 015 |
| locality_code | string | Optional INEGI locality code to narrow results |
| q | string | Optional street name search (partial match) |
| limit | integer | Results per page (max 100, default 50) |
| page | integer | Page number |
Request
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.postalkit.mx/v1/streets?state_code=09&municipality_code=015&q=Reforma"
Response
{
"data": [
{
"id": 1,
"name": "Reforma",
"code": "0001",
"ambito": "Urbano",
"street_type": { "id": 1, "name": "Avenida", "code": "01" },
"state": { "id": 1, "name": "Ciudad de México", "code": "09" },
"municipality": { "id": 6, "name": "Cuauhtémoc", "code": "015" }
}
],
"links": { "first": "...", "last": "...", "prev": null, "next": null },
"meta": { "current_page": 1, "total": 1, "per_page": 50 }
}
{ "message": "The given data was invalid.", "errors": { "state_code": ["The \"state_code\" query parameter is required."] } }