A hazard curve gives the probability of exceeding each intensity measure level at a site. Hazard curves are available through the EFEHR REST API under the base URL https://efehr-services.ethz.ch/hazard/api/v1. All endpoints use HTTP GET and return JSON by default; add format=nrml to receive NRML instead. Data are published under CC BY 4.0 (DOI 10.12686/a15).
The steps below narrow down the options available at your site (model, intensity measure type, soil type, aggregation) and then retrieve the curve. The examples use Basel (47.5° N, 7.6° E) and the European Seismic Hazard Model 2020 (ESHM20, model id 81). Long lists in the response examples are shortened with "…". The complete, interactive reference is available at efehr-services.ethz.ch/hazard/api/docs.
| User query | Which hazard models provide hazard curves for the site of my interest? |
|---|---|
| Request format | /v1/models?lat=[latitude]&lon=[longitude]&filter_curves=true |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/models?lat=47.5&lon=7.6&filter_curves=true |
| Response example |
{
"models": [
{
"id": 77,
"name": "Swiss Hazard Model 2015 (SUIhaz15)"
},
{
"id": 81,
"name": "European Seismic hazard Model 2020 (ESHM20)"
}
],
"count": 2
}
|
| User query | For which intensity measure types are hazard curves available from the model of my interest, at the site of my interest? |
|---|---|
| Request format | /v1/curves/imts?lat=[latitude]&lon=[longitude]&modelid=[modelid] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/curves/imts?lat=47.5&lon=7.6&modelid=81 |
| Response example |
{
"imts": [
{
"code": "PGA",
"name": "PGA",
"unit_type": "g",
"unit_description": "gravity, 1g = 980.5 cm/s/s defined for the B/C boundary Vs30=760m/s"
},
{
"code": "SA[0.05s]",
"name": "SA[0.05s]",
"unit_type": "g",
"unit_description": "gravity, 1g = 980.5 cm/s/s"
},
{
"code": "SA[0.10s]",
"name": "SA[0.10s]",
"unit_type": "g",
"unit_description": "gravity, 1g = 980.5 cm/s/s"
},
"\u2026",
{
"code": "SA[5.00s]",
"name": "SA[5.00s]",
"unit_type": "g",
"unit_description": "gravity, 1g = 980.5 cm/s/s"
}
]
}
|
| User query | For which soil types are hazard curves available from the model of my interest, for the intensity measure type of my interest, at the site of my interest? |
|---|---|
| Request format | /v1/curves/soiltypes?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/curves/soiltypes?lat=47.5&lon=7.6&modelid=81&imt=PGA |
| Response example |
{
"soil_types": [
{
"code": "rock_vs30_800ms-1",
"name": "rock_vs30_800ms-1"
}
]
}
|
| User query | How was the hazard of a multi-branch logic tree model aggregated for the available curves? Answers are the arithmetic mean or quantiles (ordinal aggregation with levels from 0 to 1). |
|---|---|
| Request format | /v1/curves/aggregations?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT]&soiltype=[soiltype] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/curves/aggregations?lat=47.5&lon=7.6&modelid=81&imt=PGA&soiltype=rock_vs30_800ms-1 |
| Response example |
{
"fractiles": [
{
"aggregation_type": "arithmetic",
"aggregation_level": 0.5
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.05
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.16
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.5
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.84
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.95
}
]
}
|
| User query | What is the hazard curve that matches all the above specifications? |
|---|---|
| Request format | /v1/curves?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT]&soiltype=[soiltype]&aggregationtype=[arithmetic | ordinal]&aggregationlevel=[0…1] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/curves?lat=47.5&lon=7.6&modelid=81&imt=PGA&soiltype=rock_vs30_800ms-1&aggregationtype=arithmetic&aggregationlevel=0.5 |
| Response example |
{
"curves": [
{
"lon": 7.5821339,
"lat": 47.5,
"model_id": 81,
"model_name": "European Seismic hazard Model 2020 (ESHM20)",
"imt": "PGA",
"sa_period": null,
"sa_damping": null,
"aggregation_type": "arithmetic",
"aggregation_level": 0.5,
"soil_type": "rock_vs30_800ms-1",
"investigation_time": 50,
"points": [
{
"iml": 0.0005,
"poe": 0.9996462464
},
{
"iml": 0.0007184440843,
"poe": 0.998726964
},
{
"iml": 0.001032323804,
"poe": 0.9958737493
},
"\u2026",
{
"iml": 0.1148985468,
"poe": 0.07059025764
},
{
"iml": 0.1650963624,
"poe": 0.03948215023
},
{
"iml": 0.2372250099,
"poe": 0.02021309175
},
"\u2026",
{
"iml": 2.087845154,
"poe": 3.724025373e-05
},
{
"iml": 3.0,
"poe": 7.184219157e-06
}
]
}
],
"metadata": {
"source": "EFEHR Services FastAPI",
"timestamp": null
}
}
|