Endpoints

Postal search

Find postal codes from a locality, street and house number.

POST/v1/postal-codes/search

The inverse of the postal code lookup: start from address fields and get the matching postal codes. No match is a 200 with an empty list. Requires the postal_lookup scope. See Postal lookup for the opposite direction.

Parameters (JSON body)

NameTypeRequiredDescription
localitystringyesThe locality. Up to 256 characters.
county_codestringnoCounty code (e.g. MS), to tell apart localities that share a name. Up to 256 characters.
streetstringnoThe street. Up to 256 characters.
house_numberstringnoHouse number as written on the building; alphanumerics allowed (e.g. 12A, 255-T). Requires street, otherwise 400 house_number_requires_street.
limitintegernoMaximum number of results (1-500). Defaults to 100.

Example request

curl -X POST https://api.posty.ro/v1/postal-codes/search \
  -H "Authorization: Bearer psk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "locality": "Târgu Mureș", "county_code": "MS", "street": "bd. 1 Decembrie 1918", "limit": 50 }'

Example response

{
  "postal_codes": [
    {
      "street": "bd. 1 Decembrie 1918",
      "locality": "Târgu Mureș",
      "county": "Mureș",
      "county_code": "MS",
      "postal_code": "540510",
      "house_number": "nr. 255-T"
    }
  ]
}

Common errors

  • 400 invalid_body: Unknown field or wrong type (the body is strict).
  • 400 missing_locality: locality is missing.
  • 400 house_number_requires_street: house_number sent without street.
  • 400 field_too_long: A field is longer than 256 characters.
  • 403 insufficient_scope: The key lacks the postal_lookup scope.

Errors

© 2026 posty.ro. Posty is operated by Gurulabs SRL, Str. Emile Zola nr. 1, et. III, ap. 6, 400112 Cluj-Napoca, Cluj county, Romania. Trade Register no. J2017005457128, tax ID RO38156938, EUID ROONRC.J2017005457128. Contact: support@posty.ro. Terms of Service · Privacy Policy · Cookies