Travel Risk API
Real-time travel advisories, disaster alerts, conflict events and composite country risk scores, aggregated from government and multilateral sources.…
Government & public#government
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Real-time travel advisories, disaster alerts, conflict events and composite country risk scores, aggregated from government and multilateral sources.
Authentication
Send your key in the X-API-Key header on every /api/v1/* request:
curl -H "X-API-Key: YOUR_KEY" \
https://api.travelriskapi.com/api/v1/alerts?limit=5No key yet? POST /api/v1/register with {"email": "you@example.com"} returns one immediately and emails you a copy. Lost it? POST /api/v1/recover-key.
Plans and limits
| Plan | Price | Requests/day | Burst/min |
|---|---|---|---|
| Free | $0 | 100 | 60 |
| Starter | $29/mo | 2,000 | 120 |
| Pro | $99/mo | 10,000 | 600 |
| Enterprise | $499/mo | unlimited | 3,000 |
The same key also opens the aviation API (/api/v9, /adb, /ext/v1): flight status, airports, airlines, airline safety, in-flight Wi-Fi and Starlink, airport security wait times. Reference: https://api.travelriskapi.com/ext/reference/
Credits (from $10 for 10,000 requests, no subscription) are consumed only after the daily quota is exhausted, so they act as overflow. See GET /api/v1/billing/plans.
The daily counter resets at 00:00 UTC. Two independent limits apply — a per-minute burst limit and the daily quota — and each returns 429 with Retry-After.
Response headers
| Header | Meaning |
|---|---|
X-Quota-Limit / X-Quota-Used / X-Quota-Remaining | your daily allowance |
X-Credits-Balance | prepaid credits left |
X-RateLimit-Limit / X-RateLimit-Remaining | per-minute burst |
X-Cache | HIT or MISS — responses are cached server-side for 15 minutes |
ETag, Age | cache metadata (informational) |
Cache-Control: no-cache is intentional: we cache on our side to answer faster, but you always reach us, so you never receive data your own HTTP library held back.
Risk scores
An advisory_level of 0 means no source publishes an advisory for that territory (small dependencies, some overseas territories) — treat it as no data, not as risk-free. Published levels are 1-4.
risk_score is a composite on a 1-5 scale: the advisory level plus up to +2.0 from currently active alerts, with diminishing returns: impact = 2 * (1 - exp(-w / 4)), where w weighs each alert by severity (Critical 1.0, High 0.5, Medium 0.25, Low 0) and local zone-level warnings (US National Weather Service counties) at 1/20. Capped at 5.0. The same value is returned by /countries and /risk-score/{iso} — they share one implementation. /countries also exposes base_risk_score (the advisory level alone) and active_alerts so you can see how a score was reached.
Tracking changes
List responses also carry data_updated_at (the newest record we hold) and generated_at (when this payload was assembled), so freshness is explicit. Conflict data is pulled every 15 minutes, alerts every 6 hours, government advisories daily.
Alert ids are stable: when an upstream revises an alert (severity escalates, wording changes), we update the same record and bump updated_at rather than issuing a new id. To sync incrementally, poll with updated_since:
GET /api/v1/alerts?updated_since=2026-08-26T00:00:00&limit=1000That returns alerts created or revised since that moment. Keep the highest updated_at you have seen and pass it back next time. created_at never moves, so updated_at > created_at means the alert has been revised at least once.
Country codes
Endpoints taking a country accept ISO 3166-1 alpha-3 (USA, GBR, FRA). For convenience alpha-2 (US, GB) is also accepted, as are the legacy 3-letter codes this API used before 2026-08-11. GET /api/v1/countries/codes returns every supported code in one response.
Changelog
Every API change is listed at https://travelriskapi.com/changelog — including new fields, which are the most likely thing to surprise a strict JSON parser. We add fields; we do not rename or remove them without notice, and API keys do not expire.
Pagination
List endpoints take skip and limit (max 1000 per page) and report total, so a full export of ~19,000 alerts takes 20 requests and a few seconds. Responses are compressed (gzip/zstd) when your client advertises support.
Endpoints 22
Public Data
- GETFlat list of every valid ISO 3166-1 alpha-3 code we cover
/api/v1/countries/codesAll supported country codes in one response, no pagination. /api/v1/countries is paginated (100 max per page), which makes "give me the list of valid codes" a… - GETList countries with advisory levels
/api/v1/countries - GETGet country detail by ISO-3 code
/api/v1/countries/:iso_code - GETList active alerts with optional filters
/api/v1/alerts - GETGet alert detail by ID
/api/v1/alerts/:alert_id - GETComposite risk score (advisory level + active-alert impact)
/api/v1/risk-score/:iso_code - POSTAssess an itinerary: destination risk, nearby alerts and flight status per segment
/api/v1/trips/assessSend flights (flight number and/or airports) and stays (country). For each segment you get the destination country's risk score and government advisory… - GETList watched trips
/api/v1/trips - POSTWatch a trip: re-assessed every 30 minutes, new risk pushed to email, Slack, Teams or your webhook
/api/v1/tripsSame itinerary shape as /trips/assess plus external_id (your trip id; sending it again updates the trip), traveler and notify (emails, slack_webhook,… - GETGet a watched trip with its latest assessment
/api/v1/trips/:trip_id - DELETEStop watching a trip
/api/v1/trips/:trip_id - POSTSend a test notification to the trip's channels
/api/v1/trips/:trip_id/test-notification - GETRecent armed-conflict incidents (coerce, assault, fight, mass violence)
/api/v1/conflicts - GETCountry travel advisories aggregated from multiple authoritative agencies
/api/v1/advisories
Auth
- POSTRegister a new free-tier API key
/api/v1/register - POSTEmail the API key belonging to an address
/api/v1/recover-keyResend an existing key. Always answers the same way whether or not the address exists — otherwise this endpoint becomes a way to enumerate which emails are…
Billing
- GETAvailable plans and credit packs
/api/v1/billing/plansPublic pricing, so the dashboard and landing page never drift from Stripe. - POSTStart a Stripe checkout to subscribe to starter/pro/enterprise
/api/v1/billing/checkout?tier=stringUpgrade the calling key. Authenticated so a session can never be created for someone else's key. - POSTStart a Stripe checkout to buy prepaid credits
/api/v1/billing/credits?price_id=string - POSTOpen the Stripe customer portal (cancel, switch plan, update card)
/api/v1/billing/portal
Usage
- GETDaily/monthly usage breakdown for your API key
/api/v1/usage
System
- GETService health check
/api/v1/health
API details
- Base URL
https://api.travelriskapi.com- Authentication
- An API key in the X-API-Key header
- Operations
- 22 operations on 20 pathsGET 13POST 8DELETE 1
- Main resources
- Public Data 14Billing 4Auth 2System 1Usage 1
- Response formats
application/json- Description format
- OpenAPI 3.1.0, API version
1.0.0 - Links
- Documentation · OpenAPI document · Support
How to test the Travel Risk API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Travel Risk API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the X-API-Key header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Flat list of every valid ISO 3166-1 alpha-3 code we cover” (GET /api/v1/countries/codes), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Travel Risk API?
Real-time travel advisories, disaster alerts, conflict events and composite country risk scores, aggregated from government and multilateral sources.… It is listed under Government & public and has 22 endpoints.
Who publishes the Travel Risk API?
It is listed from Travel Risk API's public API description (an OpenAPI document), not published by Travel Risk API on Swastik Codes. Anyone who controls travelriskapi.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Travel Risk API?
Requests go to https://api.travelriskapi.com. Endpoint paths are added to this base URL.
How do I authenticate with the Travel Risk API?
With an API key in the X-API-Key header.
How many endpoints does the Travel Risk API have?
22 operations on 20 paths (13 GET, 8 POST, 1 DELETE). The largest groups are Public Data, Billing, Auth, System.
Is forking the Travel Risk API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.