Skip to endpoints

06/2 endpoints

Streets API

Search Mexican street names inside a state and municipio, narrow the results to a locality, and list the official street types. These endpoints are live, but the street catalog behind them is not loaded yet.

No data behind this endpoint yet

Every endpoint on this page is deployed and answers requests, but the catalog behind it is not loaded, so results come back empty. The request and response shapes below are the contract and will not change when the data lands. Nothing else in the API is affected.

Base URL https://api.postalkit.mx
Authentication
GET /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
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.postalkit.mx/v1/streets?state_code=09&municipality_code=015&q=Reforma"

Response

200 Success (paginated)
{
  "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 }
}
422 Validation Error
{ "message": "The given data was invalid.", "errors": { "state_code": ["The \"state_code\" query parameter is required."] } }
GET /v1/street-types

List Street Types

Retrieve the full catalog of street types (e.g. Avenida, Calle, Boulevard). Returns all types ordered by name.

Request

curl
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.postalkit.mx/v1/street-types

Response

200 Success
{
  "data": [
    { "id": 1, "name": "Avenida", "code": "01" },
    { "id": 2, "name": "Boulevard", "code": "02" },
    { "id": 3, "name": "Calle", "code": "03" }
  ]
}

Ready to build?

Start querying the full postal catalog in minutes.

curl -s https://api.postalkit.mx/v1/postal-codes/06600 -H "Authorization: Bearer YOUR_API_KEY"