API Documentation
Integrate NationsData economic intelligence into your applications
Authentication
All API endpoints require authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY Free: 500 req/day Pro: 5,000 req/day
Quick Start
import axios from 'axios';
// Get your watchlist
const { data: watchlist } = await axios.get(
'https://nationsdata.org/api/watchlist',
{ headers: { Authorization: 'Bearer YOUR_API_KEY' } }
);
console.log('Tracking:', watchlist.countries);
// Create an alert
await axios.post(
'https://nationsdata.org/api/alerts',
{ country: 'SGP', type: 'gdp_growth', operator: '>', threshold: 5 },
{ headers: { Authorization: 'Bearer YOUR_API_KEY' } }
);Endpoints
GET
/api/alerts Auth RequiredList your active economic alerts (requires authentication).
Example
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://nationsdata.org/api/alertsResponse
{
"alerts": [
{
"id": "alert_123",
"country": "SGP",
"type": "gdp_growth",
"operator": ">",
"threshold": 5,
"created_at": "2026-03-15T07:30:00Z"
}
]
}POST
/api/alerts Auth RequiredCreate a new economic alert for a country indicator.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country | string | Yes | ISO 3166-1 alpha-3 country code (e.g., SGP, USA) |
| type | string | Yes | Indicator type (gdp_growth, inflation, fdi, debt) |
| operator | string | Yes | Comparison operator (>, <, >=, <=) |
| threshold | number | Yes | Threshold value to trigger alert |
Example
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"country":"SGP","type":"gdp_growth","operator":">","threshold":5}' \
https://nationsdata.org/api/alertsResponse
{
"id": "alert_124",
"message": "Alert created successfully"
}GET
/api/watchlist Auth RequiredGet your tracked countries watchlist.
Example
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://nationsdata.org/api/watchlistResponse
{
"countries": ["SGP", "VNM", "ARE", "USA"],
"updated_at": "2026-03-15T07:30:00Z"
}Rate Limits
| Plan | Daily Limit | Rate |
|---|---|---|
| Explorer (Free) | 500 req/day | 10 req/min |
| Pro | 5,000 req/day | 30 req/min |