You can start using the API without any authentication at all. Anonymous requests work for all free-tier endpoints — which is useful for exploring or low-volume use cases.
For higher rate limits and access to premium endpoints, you'll need an API key.
Getting a key#
Create an account on the dashboard to get your account-specific API key. Free accounts get generous limits and can use most of the basic endpoints. Paid plans unlock the premium endpoints (Astronomy, Business Days, Travel) and much higher throughput.
Using your key#
Pass your API key in the X-API-Key header:
curl "https://worlddataapi.com/v1/countries/JP" \
-H "X-API-Key: YOUR_API_KEY"
That's it. We keep our authentication dead-simple. It's just a data fetching API, after all.
Access tiers#
| Anonymous | Free | Premium | |
|---|---|---|---|
| Reference endpoints | ✓ | ✓ | ✓ |
| Premium endpoints | — | — | ✓ |
| Rate limits | Low | Low-ish | Very High |
The Errors page documents exactly what happens when you hit rate limits. Anonymous access is intentionally limited — enough to explore and prototype, but you'll want to authenticate for anything beyond that.
Keep your key secure#
API keys are secrets. Don't commit them to version control or expose them in client-side code. If you're building a frontend application, make sure route API calls through your own backend to keep the key private.