Skip to content
Docs
Get API key
Tools

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?”

JSON
{}
Example response
JSON
{
  "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 Country names 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.

ParameterTypeRequiredDefaultAllowed values / formatDescription
countrystring or string[]No—Country namesFor example "sweden" or ["italy", "spain"]. Omit for all countries.

Example

“What are the latest credit ratings for Italy and Spain?”

JSON
{ "country": ["italy", "spain"] }
Example response
JSON
{
  "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

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?”

JSON
{}
Example response
JSON
{
  "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 Date when chronology matters.
  • Date uses the format M/D/YYYY, and LastUpdate the format M/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.

ParameterTypeRequiredDefaultAllowed values / formatDescription
countrystring or string[]No—Country namesFor example "portugal" or ["mexico", "sweden"]. Omit for all countries.
startDatestringNo—YYYY-MM-DDStart of the range.
endDatestringNo—YYYY-MM-DDEnd of the range. Requires startDate.

Example

“Show the full credit rating history of Portugal.”

JSON
{ "country": "portugal", "startDate": "1900-01-01" }
Example response
JSON
{
  "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" as startDate for the full history.