Skip to content

peviitor-ro/orase

Repository files navigation

API Localități din România

E2E Tests ALBA ARAD ARGES BACAU BIHOR BISTRITA-NASAUD

Un API public care oferă informații despre toate localitățile din România: comune, municipii, orașe și sate.

🌐 Endpoint-uri

Accesare generală

Metodă URL Descriere
GET https://orase.peviitor.ro/ Toate localitățile din România
GET https://orase.peviitor.ro/judete/ Lista tuturor judetelor din România
GET https://orase.peviitor.ro/ROMANIA/ Lista completă cu toate judetele

Accesare pe judete

Fiecare judet poate fi accesat individual folosind următorul format:

https://orase.peviitor.ro/ROMANIA/{JUDET}/
Metodă Endpoint
GET https://orase.peviitor.ro/ROMANIA/BUCURESTI/
GET https://orase.peviitor.ro/ROMANIA/ALBA/
GET https://orase.peviitor.ro/ROMANIA/ARAD/
GET https://orase.peviitor.ro/ROMANIA/ARGES/
GET https://orase.peviitor.ro/ROMANIA/BACAU/
GET https://orase.peviitor.ro/ROMANIA/BIHOR/
GET https://orase.peviitor.ro/ROMANIA/BISTRITA-NASAUD/
GET https://orase.peviitor.ro/ROMANIA/BOTOSANI/
GET https://orase.peviitor.ro/ROMANIA/BRAILA/
GET https://orase.peviitor.ro/ROMANIA/BRASOV/
GET https://orase.peviitor.ro/ROMANIA/BUZAU/
GET https://orase.peviitor.ro/ROMANIA/CALARASI/
GET https://orase.peviitor.ro/ROMANIA/CARAS-SEVERIN/
GET https://orase.peviitor.ro/ROMANIA/CLUJ/
GET https://orase.peviitor.ro/ROMANIA/CONSTANTA/
GET https://orase.peviitor.ro/ROMANIA/COVASNA/
GET https://orase.peviitor.ro/ROMANIA/DAMBOVITA/
GET https://orase.peviitor.ro/ROMANIA/DOLJ/
GET https://orase.peviitor.ro/ROMANIA/GALATI/
GET https://orase.peviitor.ro/ROMANIA/GIURGIU/
GET https://orase.peviitor.ro/ROMANIA/GORJ/
GET https://orase.peviitor.ro/ROMANIA/HARGHITA/
GET https://orase.peviitor.ro/ROMANIA/HUNEDOARA/
GET https://orase.peviitor.ro/ROMANIA/IALOMITA/
GET https://orase.peviitor.ro/ROMANIA/IASI/
GET https://orase.peviitor.ro/ROMANIA/ILFOV/
GET https://orase.peviitor.ro/ROMANIA/MARAMURES/
GET https://orase.peviitor.ro/ROMANIA/MEHEDINTI/
GET https://orase.peviitor.ro/ROMANIA/MURES/
GET https://orase.peviitor.ro/ROMANIA/NEAMT/
GET https://orase.peviitor.ro/ROMANIA/OLT/
GET https://orase.peviitor.ro/ROMANIA/PRAHOVA/
GET https://orase.peviitor.ro/ROMANIA/SALAJ/
GET https://orase.peviitor.ro/ROMANIA/SATUMARE/
GET https://orase.peviitor.ro/ROMANIA/SIBIU/
GET https://orase.peviitor.ro/ROMANIA/SUCEAVA/
GET https://orase.peviitor.ro/ROMANIA/TELEORMAN/
GET https://orase.peviitor.ro/ROMANIA/TIMIS/
GET https://orase.peviitor.ro/ROMANIA/TULCEA/
GET https://orase.peviitor.ro/ROMANIA/VALCEA/
GET https://orase.peviitor.ro/ROMANIA/VASLUI/
GET https://orase.peviitor.ro/ROMANIA/VRANCEA/

💻 Utilizare

Exemplu de apel din JavaScript

// Obține toate localitățile din România
fetch('https://orase.peviitor.ro/')
  .then(response => response.json())
  .then(data => console.log(data));

// Obține localitățile dintr-un judet specific (ex: CLUJ)
fetch('https://orase.peviitor.ro/ROMANIA/CLUJ/')
  .then(response => response.json())
  .then(data => console.log(data));

Exemplu de apel din PHP

// Obține localitățile din Brașov
$json = file_get_contents('https://orase.peviitor.ro/ROMANIA/BRASOV/');
$data = json_decode($json, true);
print_r($data);

Exemplu de apel cu cURL

# Obține toate localitățile
curl https://orase.peviitor.ro/

# Obține localitățile dintr-un judet
curl https://orase.peviitor.ro/ROMANIA/iasi/

📋 Structura răspunsului

Răspunsul este în format JSON și conține:

{
  "nume": "ROMÂNIA",
  "judet": [
    {
      "nume": "CLUJ",
      "municipiu": [...],
      "oras": [...],
      "comuna": [...]
    }
  ]
}

Fiecare localitate include:

  • nume - Numele localității
  • tip - Tipul (sat, oras, municipiu)
  • localitate - Sub-localități (pentru municipii/orașe)
  • adresaCompleta - Adresa completă în format românesc

🤝 Contribuții

Contribuțiile sunt binevenite! Vă rugăm să deschideți un issue sau un pull request.

📄 Licență

MIT

About

Toate localitățile din România în format JSON

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages