Parse an address (free text)
Takes a single string (q) — e.g. „Petroșani, jud Hunedoara, str Șt O Iosif nr 1a" — parses it into components and matches them conjunctively: every signal (county / street / postal code / number) narrows the result, and if everything points at a single entity only that one comes back. No „valid" boolean: nivel_confirmat says how deep the confirmation went, componente[*].stare what happened to each field, potrivire gives the summary. The official layer (locality→unit→county→region, postal code) is complete; street and number come from OSM (partial coverage), so they can come back negasit without the address being invalid.
Query parameters
How it behaves
- Parses an address given as free text (
q) into components and matches them conjunctively: every signal (county / locality / street / postal code / number) narrows the result; if everything points at a single entity, only that one comes back. - No „valid" boolean:
nivel_confirmatsays how deep the confirmation went,componente[*].starewhat happened to each field,potriviregives the summary. - The official layer (locality→unit→county→region, postal code) is complete; street and number come from OSM (partial coverage), so they can come back
negasitwithout the address being invalid. - Matching uses the gazetteer (aliases: „Cluj" → Cluj-Napoca, exonyms, historical names) and disambiguates by population.
rezultate[].matched_onsays HOW each entity was matched. unparsedholds the segments we could not assign (e.g. „next to the church") — always present, even when empty; it is the main source of improvements (missing aliases and so on).
What it is for
- A single „full address" box: the user pastes everything, you split it into components and resolve it to locality/unit/county (administrative geocoding) with a
cod_siruta. - Processing orders from emails, CSVs or marketplaces: free-text addresses → official entities, for courier routing or county-level reporting.
- Confirmation for the user: from what they typed, you show what the system understood („we found Cluj-Napoca, Cluj county") before saving.
Response structure
null if none was recognised.
Response examples
{
"data": {
"parsat": {
"judet": "Cluj",
"localitate": "Cluj-Napoca",
"strada": "Memorandumului",
"numar": "28",
"cod_postal": null,
"detalii": null
},
"potrivire": "exacta",
"nivel_confirmat": "numar",
"ambiguu": false,
"unparsed": [],
"componente": {
"judet": {
"stare": "confirmat",
"cod": "CJ",
"nume": "Cluj"
},
"localitate": {
"stare": "confirmat"
},
"strada": {
"stare": "confirmat",
"nume": "Memorandumului"
},
"numar": {
"stare": "confirmat",
"numar": "28"
}
},
"rezultate": [
{
"numar": {
"numar": "28",
"cod_postal": "400114",
"lat": 46.769304853413416,
"lng": 23.585544611959204
},
"strada": {
"nume": "Memorandumului",
"cod_postal": "400114",
"lat": 46.76951318182015,
"lng": 23.58672888056244
},
"localitate": {
"cod_siruta": 54984,
"nume": "Cluj-Napoca",
"tip": "resedinta_municipiu",
"populatie": 286598,
"lat": 46.78,
"lng": 23.559444444444
},
"uat": {
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu"
},
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"regiune": {
"cod": "RO11",
"nume": "Nord-Vest"
},
"matched_on": {
"localitate": "nume_oficial",
"strada": "nume_oficial"
}
}
]
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"strazi": "2026-10-06T16: 33: 40+03: 00"
}
}
}
„Cluj" → Cluj-Napoca (matched_on: nume_scurt).
{
"data": {
"parsat": {
"judet": "CJ",
"localitate": "Cluj",
"strada": "Memorandumului",
"numar": "28",
"cod_postal": null,
"detalii": null
},
"potrivire": "exacta",
"nivel_confirmat": "numar",
"ambiguu": false,
"unparsed": [],
"componente": {
"judet": {
"stare": "confirmat",
"cod": "CJ",
"nume": "Cluj"
},
"localitate": {
"stare": "confirmat"
},
"strada": {
"stare": "confirmat",
"nume": "Memorandumului"
},
"numar": {
"stare": "confirmat",
"numar": "28"
}
},
"rezultate": [
{
"numar": {
"numar": "28",
"cod_postal": "400114",
"lat": 46.769304853413416,
"lng": 23.585544611959204
},
"strada": {
"nume": "Memorandumului",
"cod_postal": "400114",
"lat": 46.76951318182015,
"lng": 23.58672888056244
},
"localitate": {
"cod_siruta": 54984,
"nume": "Cluj-Napoca",
"tip": "resedinta_municipiu",
"populatie": 286598,
"lat": 46.78,
"lng": 23.559444444444
},
"uat": {
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu"
},
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"regiune": {
"cod": "RO11",
"nume": "Nord-Vest"
},
"matched_on": {
"localitate": "nume_scurt",
"strada": "nume_oficial"
}
}
]
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"strazi": "2026-10-06T16: 33: 40+03: 00"
}
}
}
„langa biserica" („near the church", free text with no toponym) → unparsed.
{
"data": {
"parsat": {
"judet": null,
"localitate": "Cluj-Napoca",
"strada": "Memorandumului",
"numar": "28",
"cod_postal": null,
"detalii": null
},
"potrivire": "exacta",
"nivel_confirmat": "numar",
"ambiguu": false,
"unparsed": [
"langa biserica"
],
"componente": {
"localitate": {
"stare": "confirmat"
},
"strada": {
"stare": "confirmat",
"nume": "Memorandumului"
},
"numar": {
"stare": "confirmat",
"numar": "28"
}
},
"rezultate": [
{
"numar": {
"numar": "28",
"cod_postal": "400114",
"lat": 46.769304853413416,
"lng": 23.585544611959204
},
"strada": {
"nume": "Memorandumului",
"cod_postal": "400114",
"lat": 46.76951318182015,
"lng": 23.58672888056244
},
"localitate": {
"cod_siruta": 54984,
"nume": "Cluj-Napoca",
"tip": "resedinta_municipiu",
"populatie": 286598,
"lat": 46.78,
"lng": 23.559444444444
},
"uat": {
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu"
},
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"regiune": {
"cod": "RO11",
"nume": "Nord-Vest"
},
"matched_on": {
"localitate": "nume_oficial",
"strada": "nume_oficial"
}
}
]
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"strazi": "2026-10-06T16: 33: 40+03: 00"
}
}
}
{
"data": {
"parsat": {
"judet": "Ilfov",
"localitate": "Bragadiru",
"strada": null,
"numar": null,
"cod_postal": null,
"detalii": null
},
"potrivire": "exacta",
"nivel_confirmat": "localitate",
"ambiguu": false,
"unparsed": [],
"componente": {
"judet": {
"stare": "confirmat",
"cod": "IF",
"nume": "Ilfov"
},
"localitate": {
"stare": "confirmat"
}
},
"rezultate": [
{
"localitate": {
"cod_siruta": 179230,
"nume": "Bragadiru",
"tip": "resedinta_oras",
"populatie": 40080,
"lat": 44.36944444,
"lng": 25.97527778
},
"uat": {
"cod_siruta": 179221,
"nume": "Bragadiru",
"tip": "oras"
},
"judet": {
"cod": "IF",
"nume": "Ilfov"
},
"regiune": {
"cod": "RO32",
"nume": "București-Ilfov"
},
"matched_on": {
"localitate": "nume_oficial"
}
}
]
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"strazi": "2026-10-06T16: 33: 40+03: 00"
}
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | validare | An undeclared parameter or a value that fails validation (q). The offending field is in detalii. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "validare",
"mesaj": "An undeclared parameter or a value that fails validation (q). The offending field is in detalii.",
"detalii": {
"q": [
"The value sent does not satisfy the parameter rule."
]
}
}
}