Country dashboard
curl --request GET \
--url https://www.prometheus.services/api/v1/countries/{iso} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://www.prometheus.services/api/v1/countries/{iso}"
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://www.prometheus.services/api/v1/countries/{iso}', 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://www.prometheus.services/api/v1/countries/{iso}",
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://www.prometheus.services/api/v1/countries/{iso}"
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://www.prometheus.services/api/v1/countries/{iso}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.prometheus.services/api/v1/countries/{iso}")
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{
"country": {
"iso2": "US",
"iso3": "USA",
"name": "United States",
"officialName": null,
"region": "Americas",
"subregion": "North America",
"capital": null,
"governmentType": null,
"headOfState": null,
"headOfGovernment": null,
"riskScore": null,
"headline": {
"population": null,
"gdpUsdBn": 32475.21,
"gdpGrowth": null,
"inflation": null,
"unemployment": 4.1,
"policyRate": 3.63,
"debtToGdp": null,
"currencyCode": "USD",
"currentAccountPctGdp": null
},
"ratings": [],
"indices": [],
"fx": [],
"commodities": [],
"mostActive": [],
"macroSeries": [
{
"key": "ADP_PAYROLLS",
"label": "ADP Private Payroll Employment",
"unit": "Thousands of Persons",
"category": "labor",
"latest": 132653000,
"yoyChange": 29000,
"history": [
{
"period": "2024-03-02",
"value": 131183000
},
{
"period": "2024-03-09",
"value": 131153000
}
]
},
{
"key": "AVG_HOURLY_EARNINGS",
"label": "Avg Hourly Earnings, Production & Nonsup.",
"unit": "$ per Hour",
"category": "labor",
"latest": 32.4,
"yoyChange": 0.03999999999999915,
"history": [
{
"period": "2016-08-01",
"value": 21.6
},
{
"period": "2016-09-01",
"value": 21.62
}
]
},
{
"key": "AVG_WEEKLY_HOURS",
"label": "Average Weekly Hours, Total Private",
"unit": "Hours",
"category": "labor",
"latest": 34.3,
"yoyChange": 0,
"history": [
{
"period": "2016-08-01",
"value": 34.3
},
{
"period": "2016-09-01",
"value": 34.4
}
]
}
],
"yieldCurve": [
{
"tenorMonths": 3,
"tenorLabel": "3M",
"yield": 3.87
},
{
"tenorMonths": 24,
"tenorLabel": "2Y",
"yield": 4.19
},
{
"tenorMonths": 60,
"tenorLabel": "5Y",
"yield": 4.39
}
],
"upcomingAuctions": [],
"leaders": [],
"legislature": null,
"elections": [],
"freedomScore": null,
"corruptionIndex": null,
"relations": [],
"sanctionsImposed": [],
"sanctionsAgainst": [],
"topTradePartners": [],
"treaties": [],
"resources": [],
"energyMix": [],
"foodSelfSufficiency": null,
"waterStressIndex": null,
"military": null,
"news": []
}
}{
"error": "<string>",
"code": "unauthenticated"
}{
"error": "<string>",
"code": "unauthenticated"
}{
"error": "<string>",
"code": "unauthenticated"
}{
"error": "<string>",
"code": "unauthenticated"
}Macro
Country dashboard
Country macro dashboard: indicators and latest values.
GET
/
api
/
v1
/
countries
/
{iso}
Country dashboard
curl --request GET \
--url https://www.prometheus.services/api/v1/countries/{iso} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://www.prometheus.services/api/v1/countries/{iso}"
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://www.prometheus.services/api/v1/countries/{iso}', 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://www.prometheus.services/api/v1/countries/{iso}",
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://www.prometheus.services/api/v1/countries/{iso}"
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://www.prometheus.services/api/v1/countries/{iso}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.prometheus.services/api/v1/countries/{iso}")
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{
"country": {
"iso2": "US",
"iso3": "USA",
"name": "United States",
"officialName": null,
"region": "Americas",
"subregion": "North America",
"capital": null,
"governmentType": null,
"headOfState": null,
"headOfGovernment": null,
"riskScore": null,
"headline": {
"population": null,
"gdpUsdBn": 32475.21,
"gdpGrowth": null,
"inflation": null,
"unemployment": 4.1,
"policyRate": 3.63,
"debtToGdp": null,
"currencyCode": "USD",
"currentAccountPctGdp": null
},
"ratings": [],
"indices": [],
"fx": [],
"commodities": [],
"mostActive": [],
"macroSeries": [
{
"key": "ADP_PAYROLLS",
"label": "ADP Private Payroll Employment",
"unit": "Thousands of Persons",
"category": "labor",
"latest": 132653000,
"yoyChange": 29000,
"history": [
{
"period": "2024-03-02",
"value": 131183000
},
{
"period": "2024-03-09",
"value": 131153000
}
]
},
{
"key": "AVG_HOURLY_EARNINGS",
"label": "Avg Hourly Earnings, Production & Nonsup.",
"unit": "$ per Hour",
"category": "labor",
"latest": 32.4,
"yoyChange": 0.03999999999999915,
"history": [
{
"period": "2016-08-01",
"value": 21.6
},
{
"period": "2016-09-01",
"value": 21.62
}
]
},
{
"key": "AVG_WEEKLY_HOURS",
"label": "Average Weekly Hours, Total Private",
"unit": "Hours",
"category": "labor",
"latest": 34.3,
"yoyChange": 0,
"history": [
{
"period": "2016-08-01",
"value": 34.3
},
{
"period": "2016-09-01",
"value": 34.4
}
]
}
],
"yieldCurve": [
{
"tenorMonths": 3,
"tenorLabel": "3M",
"yield": 3.87
},
{
"tenorMonths": 24,
"tenorLabel": "2Y",
"yield": 4.19
},
{
"tenorMonths": 60,
"tenorLabel": "5Y",
"yield": 4.39
}
],
"upcomingAuctions": [],
"leaders": [],
"legislature": null,
"elections": [],
"freedomScore": null,
"corruptionIndex": null,
"relations": [],
"sanctionsImposed": [],
"sanctionsAgainst": [],
"topTradePartners": [],
"treaties": [],
"resources": [],
"energyMix": [],
"foodSelfSufficiency": null,
"waterStressIndex": null,
"military": null,
"news": []
}
}{
"error": "<string>",
"code": "unauthenticated"
}{
"error": "<string>",
"code": "unauthenticated"
}{
"error": "<string>",
"code": "unauthenticated"
}{
"error": "<string>",
"code": "unauthenticated"
}Authorizations
apiKeycognitoIdToken
Prometheus API key (pk_live_...), created on the Developers page in the terminal. Also accepted as Authorization: Bearer pk_live_....
Path Parameters
ISO 3166-1 alpha-2 country code (e.g. US).
Response
OK
The response is of type object.
⌘I