A simple API for travel advisories published by the Australian DFAT Smartraveller.
This is not an official API. Visit the Smartraveller website for the latest information.
Available at https://smartraveller.api.kevle.xyz/
pip install pipenv
pipenv install
pipenv run python wsgi.py
Or configure a WSGI production server
Get an advice summary for a country. May be cached for up to 1 hour.
- country (required)
- ISO alpha-2 country codes
https://smartraveller.api.kevle.xyz/advisory?country=es
{
"country": {
"name": "Spain",
"alpha_2": "ES"
},
"advisory": "Exercise normal safety precautions",
"level": 1,
"page_url": "https://www.smartraveller.gov.au/destinations/europe/spain"
}
Get all available Smartraveller advisories. This is updated every 6 hours.
{
"last_updated": "2024-10-05T04:55:06.260067+00:00",
"advisories": [
{
"country": {
"name": "Spain",
"alpha_2": "ES"
},
"advisory": "Exercise normal safety precautions",
"level": 1,
"page_url": "https://www.smartraveller.gov.au/destinations/europe/spain"
},
]
}
Get all available Smartraveller destinations. This is updated every 6 hours.
{
"last_updated": "2024-10-05T04:55:06.260067+00:00",
"destinations": {
"ES": {
"country": {
"name": "Spain",
"alpha_2": "ES"
},
"page_url": "/destinations/europe/spain"
},
}
}
Smartraveller publishes advisories under non-standard names for countries and does not seem to utilise any standard country codes. Countries have been mapped using a fuzzy search for the country based on the URL slug fetched from: https://www.smartraveller.gov.au/api/publishedpages.
This method of parsing countries may produce inconsistent or inaccurate results.
If a country can't be found it may be due to a failed lookup, or an advisory not being published for that country.
Smartraveller material is provided under the latest Creative Commons Attribution licence.
Information: https://www.smartraveller.gov.au/copyright