Complete REST API for accessing global data across 200+ countries. Get started in minutes.
curl -X GET "https://api.costmaps.com/api/v1/countries/US" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"code": "US",
"name": "United States",
"region": "North America",
"population": 331900000,
"currency": "USD",
"capital": "Washington D.C."
}Sub-200ms response times with 99.9% uptime SLA on Enterprise plans
Enterprise-grade security with JWT authentication and rate limiting
200+ countries with 9 data modules updated daily to bi-annually
https://api.costmaps.com/api/v1Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY/countriesList all countries
/countries/:codeGet country details
/cost-of-living/countries/:codeGet cost of living data
/cost-of-living/compareCompare multiple countries
/economic/countries/:codeGet economic indicators
/real-estate/countries/:codeGet real estate metrics
/jobs/salaries/:codeGet salary data by job category
/jobs/tax-calculator/:codeCalculate take-home pay
/metrics/:codeGet all metrics for a country
Full API Reference: For complete documentation with all parameters, responses, and error codes, visit our OpenAPI/Swagger documentation →
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.costmaps.com/api/v1"
headers = {
"Authorization": f"Bearer {API_KEY}"
}
# Get country data
response = requests.get(
f"{BASE_URL}/countries/US",
headers=headers
)
data = response.json()
print(data)
# Compare countries
response = requests.get(
f"{BASE_URL}/cost-of-living/compare",
params={"countries": "US,UK,DE"},
headers=headers
)
comparison = response.json()
print(comparison)const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.costmaps.com/api/v1';
// Using fetch
async function getCountryData(countryCode) {
const response = await fetch(`${BASE_URL}/countries/${countryCode}`, {
headers: {
'Authorization': `Bearer ${API_KEY}`
}
});
const data = await response.json();
return data;
}
// Using axios
const axios = require('axios');
axios.get(`${BASE_URL}/cost-of-living/countries/US`, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));# Get country data curl -X GET "https://api.costmaps.com/api/v1/countries/US" \ -H "Authorization: Bearer YOUR_API_KEY" # Compare countries curl -X GET "https://api.costmaps.com/api/v1/cost-of-living/compare?countries=US,UK,DE" \ -H "Authorization: Bearer YOUR_API_KEY" # Get salaries curl -X GET "https://api.costmaps.com/api/v1/jobs/salaries/US" \ -H "Authorization: Bearer YOUR_API_KEY"
Official SDKs for Python, JavaScript, Ruby, PHP, and Go are in development.
In the meantime, you can use any HTTP client library to interact with our REST API. All endpoints follow standard REST conventions.
| Status Code | Meaning | Description |
|---|---|---|
200 | OK | Request successful |
400 | Bad Request | Invalid parameters |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Access denied (tier restriction) |
404 | Not Found | Resource not found |
429 | Too Many Requests | Rate limit exceeded |
500 | Server Error | Internal server error |
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "You have exceeded your daily API limit",
"details": {
"limit": 100,
"used": 100,
"reset_at": "2026-03-20T00:00:00Z"
}
}
}Our support team is here to help you integrate CostMaps into your applications.