Country and Credit Rating Tools
Country reference data, and sovereign credit ratings from S&P and DBRS.
get_countries
Countries covered, with ISO codes.
Returns every country covered by Trading Economics, with its continent, regional group and ISO codes.
This tool takes no parameters.
Example
“Which countries does Trading Economics cover?”
{}Example response
{
"columns": ["Country", "Continent", "Group", "ISO3", "ISO2"],
"rows": [
["Afghanistan", "Asia", "Asia", "AFG", "AF"],
["Albania", "Europe", "Europe", "ALB", "AL"]
]
}Retrieved on October 26, 2026; truncated to the first 2 rows.
Returns
Country, Continent, Group, ISO3, ISO2.
Notes
- Use the
Countrynames as the country parameters of the other tools. - The list also includes aggregates, such as
"Euro area","European Union"and"World".
get_credit_ratings
Latest sovereign credit ratings.
Returns the latest sovereign credit ratings and outlooks from S&P and DBRS, for all countries or for specific countries.
| Parameter | Type | Required | Default | Allowed values / format | Description |
|---|---|---|---|---|---|
country | string or string[] | No | — | Country names | For example "sweden" or ["italy", "spain"]. Omit for all countries. |
Example
“What are the latest credit ratings for Italy and Spain?”
{ "country": ["italy", "spain"] }Example response
{
"columns": ["Country", "Date", "Agency", "Rating", "Outlook"],
"rows": [
["Italy", "1/30/2026", "S&P", "BBB+", "Positive"],
["Italy", "10/17/2025", "DBRS", "A (low)", "Stable"]
]
}Retrieved on October 26, 2026; truncated to 2 of 4 rows. Values change over time.
Returns
Country, Date, Agency, Rating, Outlook.
Notes
- For recent rating changes, use
get_credit_rating_updates; for the history of ratings, useget_credit_ratings_historical. Dateuses the formatM/D/YYYY, for example"1/30/2026".
get_credit_rating_updates
Most recent rating changes.
Returns the most recent sovereign credit rating changes across all countries and agencies.
This tool takes no parameters.
Example
“Which sovereign ratings changed recently?”
{}Example response
{
"columns": ["Country", "Date", "Agency", "Rating", "Outlook", "LastUpdate"],
"rows": [
["Togo", "10/16/2026", "S&P", "B+", "Positive", "10/19/2026 10:40:00 AM"],
["Mozambique", "9/25/2026", "S&P", "CCC", "Negative", "9/28/2026 9:02:00 AM"]
]
}Retrieved on October 26, 2026; truncated to 2 of 30 rows. Values change over time.
Returns
Country, Date (when the agency released the rating), Agency, Rating, Outlook, LastUpdate (when the record was last updated, which can be later than Date).
Notes
- The records are not returned in any guaranteed order. Sort by
Datewhen chronology matters. Dateuses the formatM/D/YYYY, andLastUpdatethe formatM/D/YYYY h:mm:ss AM/PM.
get_credit_ratings_historical
History of sovereign rating actions.
Returns the history of sovereign credit rating actions, for all countries or for specific countries.
| Parameter | Type | Required | Default | Allowed values / format | Description |
|---|---|---|---|---|---|
country | string or string[] | No | — | Country names | For example "portugal" or ["mexico", "sweden"]. Omit for all countries. |
startDate | string | No | — | YYYY-MM-DD | Start of the range. |
endDate | string | No | — | YYYY-MM-DD | End of the range. Requires startDate. |
Example
“Show the full credit rating history of Portugal.”
{ "country": "portugal", "startDate": "1900-01-01" }Example response
{
"columns": ["Country", "Date", "Agency", "Rating", "Outlook"],
"rows": [
["Portugal", "5/15/2026", "DBRS", "A (high)", "Positive"],
["Portugal", "2/27/2026", "S&P", "A+", "Positive"]
]
}Retrieved on October 26, 2026; truncated to the first 2 of 52 rows, most recent first.
Returns
Country, Date, Agency, Rating, Outlook.
Notes
- Without
startDate, only recent rating actions are returned, so a country with no recent action returns an empty list. Use"1900-01-01"asstartDatefor the full history.