curl --request GET \
--url https://astreus.ai/api/v1/countries \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/countries"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://astreus.ai/api/v1/countries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://astreus.ai/api/v1/countries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://astreus.ai/api/v1/countries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://astreus.ai/api/v1/countries")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/countries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"countries": [
{
"code": "SA",
"name": "Saudi Arabia",
"alpha_3": "SAU",
"currency_code": "SAR",
"region": "Asia",
"sub_region": "Western Asia",
"population": 36973555,
"market_value_usd": 2484030748197,
"gdp_usd_bn": 1276.94293333333,
"gdp_local_bn": 4775.83,
"gdp_local_currency": "SAR",
"gdp_growth": 1.8181477975463423,
"real_gdp_growth": 4.502466,
"real_gdp_growth_basis": "published_yoy",
"periods": {
"population": "2025-01-01",
"gdp": "2025-01-01",
"real_gdp_growth": "2025-01-01",
"nominal_gdp_growth": "2025-01-01",
"inflation": "2025-12-01",
"debt_to_gdp": null
},
"inflation": 2.0634211701652543,
"debt_to_gdp": null,
"risk_score": null,
"risk_band": null,
"sp_rating": null,
"sources": {
"gdp": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/MKTGDPSAA646NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"population": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/POPTOTSAA647NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"inflation": {
"name": "GCC-Stat",
"fullName": "GCC Statistical Center (GCC-Stat) · Marsa data portal",
"url": "https://dp.marsa.gccstat.org/dataexplorer/?ds=DF_ES_CPI",
"note": "GCC-Stat consumer prices (monthly, 2018=100) — dataflow DF_ES_CPI"
},
"real_gdp_growth": {
"name": "World Bank",
"fullName": "World Bank · World Development Indicators",
"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=SA",
"note": "WDI indicator NY.GDP.MKTP.KD.ZG"
}
},
"nominal_gdp_growth": 1.8181477975463423
},
{
"code": "BH",
"name": "Bahrain",
"alpha_3": "BHR",
"currency_code": "BHD",
"region": "Asia",
"sub_region": "Western Asia",
"population": 1600366,
"market_value_usd": 15852000723,
"gdp_usd_bn": 48.9657255319149,
"gdp_local_bn": 18.4111128,
"gdp_local_currency": "BHD",
"gdp_growth": 3.7173598423613217,
"real_gdp_growth": 3.481376,
"real_gdp_growth_basis": "published_yoy",
"periods": {
"population": "2025-01-01",
"gdp": "2025-01-01",
"real_gdp_growth": "2025-01-01",
"nominal_gdp_growth": "2025-01-01",
"inflation": "2025-12-01",
"debt_to_gdp": null
},
"inflation": 0.4891410682840931,
"debt_to_gdp": null,
"risk_score": null,
"risk_band": null,
"sp_rating": null,
"sources": {
"gdp": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/MKTGDPBHA646NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"population": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/POPTOTBHA647NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"inflation": {
"name": "GCC-Stat",
"fullName": "GCC Statistical Center (GCC-Stat) · Marsa data portal",
"url": "https://dp.marsa.gccstat.org/dataexplorer/?ds=DF_ES_CPI",
"note": "GCC-Stat consumer prices (monthly, 2018=100) — dataflow DF_ES_CPI"
},
"real_gdp_growth": {
"name": "World Bank",
"fullName": "World Bank · World Development Indicators",
"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=BH",
"note": "WDI indicator NY.GDP.MKTP.KD.ZG"
}
},
"nominal_gdp_growth": 3.7173598423613217
}
],
"sort": "real_gdp_growth",
"order": "desc",
"total": 213,
"limit": 2,
"offset": 0,
"hasMore": true,
"nextOffset": 2,
"page": {
"total": 213,
"offset": 0,
"limit": 2,
"nextOffset": 2
}
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}List countries
Countries with macro coverage and their headline figures, one page at a time: . Growth is two figures: real_gdp_growth (% year on year of real GDP, null where no real series is held) and nominal_gdp_growth (% change in nominal GDP on the same period a year earlier: not real growth); gdp_growth is a deprecated copy of nominal_gdp_growth. periods gives each figure’s period. Each row’s cube-backed values carry sources = , each — the publisher of the series the value was read from; a value without a recorded source is absent from it. A null figure is not held, never zero.
curl --request GET \
--url https://astreus.ai/api/v1/countries \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/countries"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://astreus.ai/api/v1/countries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://astreus.ai/api/v1/countries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://astreus.ai/api/v1/countries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://astreus.ai/api/v1/countries")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/countries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"countries": [
{
"code": "SA",
"name": "Saudi Arabia",
"alpha_3": "SAU",
"currency_code": "SAR",
"region": "Asia",
"sub_region": "Western Asia",
"population": 36973555,
"market_value_usd": 2484030748197,
"gdp_usd_bn": 1276.94293333333,
"gdp_local_bn": 4775.83,
"gdp_local_currency": "SAR",
"gdp_growth": 1.8181477975463423,
"real_gdp_growth": 4.502466,
"real_gdp_growth_basis": "published_yoy",
"periods": {
"population": "2025-01-01",
"gdp": "2025-01-01",
"real_gdp_growth": "2025-01-01",
"nominal_gdp_growth": "2025-01-01",
"inflation": "2025-12-01",
"debt_to_gdp": null
},
"inflation": 2.0634211701652543,
"debt_to_gdp": null,
"risk_score": null,
"risk_band": null,
"sp_rating": null,
"sources": {
"gdp": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/MKTGDPSAA646NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"population": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/POPTOTSAA647NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"inflation": {
"name": "GCC-Stat",
"fullName": "GCC Statistical Center (GCC-Stat) · Marsa data portal",
"url": "https://dp.marsa.gccstat.org/dataexplorer/?ds=DF_ES_CPI",
"note": "GCC-Stat consumer prices (monthly, 2018=100) — dataflow DF_ES_CPI"
},
"real_gdp_growth": {
"name": "World Bank",
"fullName": "World Bank · World Development Indicators",
"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=SA",
"note": "WDI indicator NY.GDP.MKTP.KD.ZG"
}
},
"nominal_gdp_growth": 1.8181477975463423
},
{
"code": "BH",
"name": "Bahrain",
"alpha_3": "BHR",
"currency_code": "BHD",
"region": "Asia",
"sub_region": "Western Asia",
"population": 1600366,
"market_value_usd": 15852000723,
"gdp_usd_bn": 48.9657255319149,
"gdp_local_bn": 18.4111128,
"gdp_local_currency": "BHD",
"gdp_growth": 3.7173598423613217,
"real_gdp_growth": 3.481376,
"real_gdp_growth_basis": "published_yoy",
"periods": {
"population": "2025-01-01",
"gdp": "2025-01-01",
"real_gdp_growth": "2025-01-01",
"nominal_gdp_growth": "2025-01-01",
"inflation": "2025-12-01",
"debt_to_gdp": null
},
"inflation": 0.4891410682840931,
"debt_to_gdp": null,
"risk_score": null,
"risk_band": null,
"sp_rating": null,
"sources": {
"gdp": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/MKTGDPBHA646NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"population": {
"name": "FRED",
"fullName": "FRED · World Bank",
"url": "https://fred.stlouisfed.org/series/POPTOTBHA647NWDB",
"note": "Retrieved from FRED (Federal Reserve Bank of St. Louis); original source: World Bank — World Development Indicators"
},
"inflation": {
"name": "GCC-Stat",
"fullName": "GCC Statistical Center (GCC-Stat) · Marsa data portal",
"url": "https://dp.marsa.gccstat.org/dataexplorer/?ds=DF_ES_CPI",
"note": "GCC-Stat consumer prices (monthly, 2018=100) — dataflow DF_ES_CPI"
},
"real_gdp_growth": {
"name": "World Bank",
"fullName": "World Bank · World Development Indicators",
"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=BH",
"note": "WDI indicator NY.GDP.MKTP.KD.ZG"
}
},
"nominal_gdp_growth": 3.7173598423613217
}
],
"sort": "real_gdp_growth",
"order": "desc",
"total": 213,
"limit": 2,
"offset": 0,
"hasMore": true,
"nextOffset": 2,
"page": {
"total": 213,
"offset": 0,
"limit": 2,
"nextOffset": 2
}
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}Authorizations
Astreus API key (pk_live_...), created on the Developers page in the terminal. Also accepted as Authorization: Bearer pk_live_....
Query Parameters
Words in the name or ISO code.
Region or sub-region, e.g. Asia, Western Asia.
Rank by this figure, largest first (name: A–Z). Default real_gdp_growth. gdp_growth is deprecated: it is nominal_gdp_growth.
real_gdp_growth, nominal_gdp_growth, gdp_usd_bn, population, inflation, debt_to_gdp, name, gdp_growth Default desc (asc for name), nulls last either way.
asc, desc Page size, 1–250, default 50 once any filter or paging parameter is given; without any, every country is served. A limit above 250 is a 400.
1 <= x <= 250Rows to skip, default 0: the previous page's nextOffset.
x >= 0Response
OK