Last Update: Monday, 15.10.2018
Sime REST API in JSON format with the current status of travel warnings for most countries. Returns the current situation as based on current information. For single countries or all at once. Further information about the data used can be found on the FAQ page. Data is updated daily and is available at 7.30 am German time (Timezone Germany/Berlin). A single request per day is sufficient.
Should you need information for all countries, it is advised to request the api without parameters. You'll get a reply with all countries at once with the same degree of details as calling them individually.
Announcement: on the sibling-website Travel-Advisory.info (english only) I provide a paid API with much more granular data.
Endpoint:
https://www.reisewarnung.net/api
Optional parameter: country
https://www.reisewarnung.net/api?country=DE
ISO 2 Letter ciuntry code, eg. DE for Germany. See also: Wikipedia List of ISO 3166-1 alpha-2 codes
Structure | Type | Field Description | |||
---|---|---|---|---|---|
api_status | Array | Common information about the reply. | |||
request | Array | Feedback on what was requested | |||
item | String (2) | This is the coutnry requested | |||
reply | VarChar | Technical feedback on the api reply | |||
code | Integer | Equals to http status codes. 200 means ok, 404 we haven't found any data. | |||
status | VarChar | A description of the status code. | |||
count | Integer | Numebr of results in [data] | |||
data | Array | This is the actual data. When there is only one result (e.g. when called with country code), [data] is directly populated with the fields described below. When all countries are requested, [data] is an array of arrays with the fields below. The key for each country is the official ISO Alpha 2 country code. | |||
code | Array | 2-Letter Codes for country and continent | |||
country | String (2) | ISO Alpha 2 country code | |||
continent | String (2) | 2 Letter continent code | |||
situation | VarChar | Details about the current situation | |||
sources | Integer | Number of found sources | |||
rating | Float | Current danger rating between 0 (no danger) and 5 (high danger) | |||
updated | Timestamp | Last update of danger rating | |||
lang | Array | Language related information | |||
de | Array | Germany (equivalent [en] for English) | |||
country | VarChar | Name of country | |||
continent | VarChar | Name of continent | |||
continent_info | VarChar | Additional info about continental region | |||
url_details | VarChar | Url of the single country details page | |||
advice | VarChar | Short summary of the status in natural language | |||
en | Array | ... | |||
... | ... |
https://www.reisewarnung.net/api?country=DE
{ "api_status": { "request": { "item": "de" }, "reply": { "code": "200", "status": "ok", "note": "The api works, we could match requested country code.", "count": 1 } }, "data": { "code": { "country": "DE", "continent": "EU" }, "situation": { "sources": 1, "rating": "2.0", "updated": "2016-06-15 07:18:21" }, "lang": { "de": { "country": "Deutschland", "continent": "Europa", "continent_info": "Westeuropa", "url_details": "https://www.reisewarnung.net/deutschland", "advice": "Reisen nach Deutschland sind weitestgehend sicher." }, "en": { "country": "Germany", "continent": "Europe", "continent_info": "Western Europe", "url_details": "https://www.reisewarnung.net/en/germany", "advice": "Travelling Germany is (relatively) safe." } } } }
The api is free of charge, regardless of private or commercial use (except reselling). Should you use the data within a website or app, please use the url from the field "url_details" as source attribution (if countries are shown individually). You can pick the language that best suits you. Alternative, it is sufficient to just name Reisewarnung.net with a general link back to the project.
Since it's a private project, I can take no warranty for correctness or uptime of the api. If you have any questions, please check out the FAQ (see navigation) or contact me.