oneapi
Sign in
Mediu v1 / Mediu

Earthquakes around a place

The point is given either as siruta (resolved through the Locations module) or as lat + lng.

GET
https://oneapi.ro/api/mediu/v1/seism/langa

Query parameters

NameTypeDescriptionAccepted values
raza_kmoptional number | null Search radius, in kilometres. Defaults to 50, maximum 1000. 1 – 1000
magnitudine_minoptional number | null Only events above this magnitude. 0 – 10
limitaoptional integer | null How many events to return, maximum 500. Defaults to 50. 1 – 500
sortareoptional string | null distanta (distance, the default), magnitudine — the strongest first — or recente (most recent). distantamagnitudinerecente
latoptional number | null Latitude of the point. Requires lng. 41 – 50
lngoptional number | null Longitude of the point. Requires lat. 19 – 32
sirutaoptional integer | null SIRUTA code of the locality or UAT. Alternative to lat + lng. 1

How it behaves

  • The point is given either as siruta or as lat + lng — not both. The SIRUTA code is resolved through the Locations module.
  • When the SIRUTA belongs to a locality, the point is the locality itself. When it belongs to a UAT, the point is the UAT centroid, which in a large commune can fall tens of kilometres from the village — the response says which of the two was used, in punct.nivel.
  • Distance is computed on the ellipsoid, in real kilometres. At Romania latitude a degree of longitude is ~70 km and a degree of latitude ~111 km, so a radius computed in degrees would be an ellipse.
  • The largest earthquakes around a locality — the page anyone buying a house looks for — are requested with sortare=magnitudine: the strongest first, the nearest on a tie. Events from the old catalogue without a magnitude go last. sortare=recente puts the newest event first; by default the order is by distance.
  • The counts are recorded events, not events that occurred. The catalogue has 1 event in the 10th century and over 33,000 in the 21st — the difference is instrumentation, not seismicity. Below magnitude 3 it only becomes complete from the 1980s, with the modern seismic network. Do not compare counts across eras.

What it is for

  • Show the seismic history around an address in a real-estate or insurance application.
  • Document in an expert report which events were recorded near a site.
  • Compare two localities by the earthquakes recorded around them.

Response structure

FieldTypeDescription
data.punct object The point used, with its source: coordinates given directly or derived from a SIRUTA code.
data.punct.lat number Latitudinea efectiv folosită.
data.punct.lng number Longitudinea efectiv folosită.
data.punct.sursa string siruta sau coordonate.
data.punct.cod_siruta integer Codul rezolvat, când s-a dat siruta.
data.punct.nume string Denumirea entității rezolvate.
data.punct.nivel string localitate (punct precis) sau uat_centroid (centrul unei suprafețe).
data.raza_km number Raza aplicată.
data.sortare string distanta | magnitudine | recente.
data.inregistrari integer Câte evenimente conține răspunsul.
data.evenimente[].distanta_km number Distanța de la punct până la epicentru, în kilometri.
data.evenimente[].cod string Cheia publică a evenimentului: momentul originii compactat, AAAALLZZTHHMMSS.
data.evenimente[].data_ora string Momentul originii, în UTC. La evenimentele istorice ora poate fi o convenție (00:00:00), nu o observație.
data.evenimente[].an integer Anul, util la filtrare și grupare.
data.evenimente[].latitudine number Latitudinea epicentrului (WGS84).
data.evenimente[].longitudine number Longitudinea epicentrului (WGS84).
data.evenimente[].adancime_km number Adâncimea focarului, în kilometri. null când sursa nu a determinat-o.
data.evenimente[].adancime_fixata boolean true dacă adâncimea a fost FIXATĂ de analist, nu determinată din date. Sunt 6.839 de astfel de evenimente — tratează-le altfel într-o analiză.
data.evenimente[].magnitudine number Magnitudinea de lucru: Mw dacă există, altfel ML, altfel MD. null la 339 de evenimente.
data.evenimente[].tip_magnitudine string Scara din care provine magnitudine: Mw, ML sau MD. Nu compara valori între scări diferite fără s-o iei în seamă.
data.evenimente[].magnitudini object Every determined magnitude, by scale, each with its error.
data.evenimente[].magnitudini.Mw number Magnitudinea moment, dacă e determinată.
data.evenimente[].magnitudini.Mw_eroare number Incertitudinea Mw.
data.evenimente[].magnitudini.ML number Magnitudinea locală (Richter), dacă e determinată.
data.evenimente[].magnitudini.ML_eroare number Incertitudinea ML.
data.evenimente[].magnitudini.MD number Magnitudinea de durată, dacă e determinată.
data.evenimente[].magnitudini.MD_eroare number Incertitudinea MD.
data.evenimente[].solutie object Location quality: horizontal error, RMS, error ellipse, number of phases and stations, azimuthal gap and quality class.
data.evenimente[].solutie.eroare_orizontala_km number Eroarea orizontală a localizării.
data.evenimente[].solutie.rms number Reziduul RMS al soluției.
data.evenimente[].solutie.elipsa_smaj_km number Semiaxa mare a elipsei de eroare.
data.evenimente[].solutie.elipsa_smin_km number Semiaxa mică a elipsei de eroare.
data.evenimente[].solutie.elipsa_azimut integer Azimutul elipsei de eroare, în grade.
data.evenimente[].solutie.nr_faze integer Câte faze seismice au intrat în soluție.
data.evenimente[].solutie.nr_statii integer Câte stații au contribuit.
data.evenimente[].solutie.nr_magnitudini integer Câte determinări de magnitudine s-au mediat.
data.evenimente[].solutie.gap_azimutal integer Cel mai mare unghi fără stații, în grade. Peste ~180° localizarea e slab constrânsă.
data.evenimente[].solutie.calitate string Clasa de calitate a soluției, A–D, așa cum o atribuie INFP.
data.observatie string Avertismentul de completitudine a catalogului.
data.sursa object The ROMPLUS catalogue of the National Institute for Earth Physics, with its licence.
data.sursa.nume string Catalogul și instituția care îl publică.
data.sursa.url string Pagina oficială a catalogului.
data.sursa.licenta string Temeiul reutilizării.
meta.distanta object How the distances in the response are measured. Present on every response that carries a distance.
meta.distanta.metoda string Always linie_dreapta (straight line): the geodesic distance over the Earth's surface, not by road.
meta.distanta.detaliu string The same information, in words.

Response examples

GEThttps://oneapi.ro/api/mediu/v1/seism/langa?siruta=54984&raza_km=100&magnitudine_min=3
{
    "data": {
        "punct": {
            "lat": 46.78,
            "lng": 23.559444444444,
            "sursa": "siruta",
            "cod_siruta": 54984,
            "nume": "Cluj-Napoca",
            "nivel": "localitate"
        },
        "raza_km": 100,
        "sortare": "distanta",
        "inregistrari": 14,
        "evenimente": [
            {
                "cod": "16030505T000000",
                "data_ora": "1603-05-05 01: 44: 24+01: 44: 24",
                "an": 1603,
                "latitudine": 46.8,
                "longitudine": 23.6,
                "adancime_km": 9.9,
                "adancime_fixata": true,
                "magnitudine": 4.7,
                "tip_magnitudine": "Mw",
                "magnitudini": {
                    "Mw": 4.7
                },
                "solutie": {
                    "calitate": "D"
                },
                "distanta_km": 3.8
            }
        ],
        "observatie": "Numerele sunt evenimente ÎNREGISTRATE, nu evenimente produse. Catalogul are 1 eveniment în secolul X și peste 33.000 în secolul XXI — diferența e instrumentație, nu seismicitate. Sub magnitudinea 3, catalogul devine complet abia din anii 1980, odată cu rețeaua seismică modernă. Nu compara numărătorile între epoci.",
        "sursa": {
            "nume": "Catalogul ROMPLUS — Institutul Naţional de Cercetare-Dezvoltare pentru Fizica Pământului (INCDFP)",
            "url": "https://www.infp.ro/index.php?i=romplus",
            "licenta": "Date de sector public, reutilizabile conform Legii 109/2007, cu indicarea sursei."
        }
    },
    "meta": {
        "distanta": {
            "metoda": "linie_dreapta",
            "detaliu": "Distanţele sunt geodezice, în linie dreaptă pe suprafaţa Pământului (WGS84) — nu pe drum."
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitThe SIRUTA code could not be resolved to a coordinate.
422validareNo point given, both forms given at once, or one coordinate without its pair.
429cota_depasitaThe 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": "No point given, both forms given at once, or one coordinate without its pair.",
        "detalii": {
            "raza_km": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}