apyhub
Back

International Trade Country Risk API

What it does

International Trade Country Risk API gives you structured country information, using the latest published figures, to help assess a market from an export and country-risk perspective. It brings together data from the OECD (Organisation for Economic Co-operation and Development), UKEF (UK Export Finance), MIGA (Multilateral Investment Guarantee Agency), and the World Bank, covering country risk, export finance, macroeconomic conditions, governance, business environment, and investment guarantees.

For a country, you can get key facts such as its OECD country risk classification, UKEF cover position, inflation, foreign-exchange reserves, governance indicators, Enterprise Survey information, and MIGA guarantee exposure. The API also provides threshold-based flags where applicable, helping you quickly identify specific conditions in the available data.

You can also compare up to 10 countries using their headline figures, or rank countries against a specific supported indicator. The available indicators include their definitions, units, sources, country coverage, and reporting periods, so you can understand exactly what a value represents before using it.

Use it for export-market research, country risk analysis, credit assessment, market comparison, trade planning, and internal dashboards where you need consistent country-level facts from multiple published sources in one place.

The API provides published figures only. It does not rate countries, provide credit advice, or recommend whether to trade with a country. Flags are not a country score, and country-level data does not describe the creditworthiness of an individual buyer. Different indicators may come from different sources and reporting periods, so each value should be interpreted together with its source and period.

▣ ENDPOINT 01 / 04
GET
Country Risk Profile
https://api.eu.apyhub.com/193market/exporter-country-facts-api/countries/:code

QUICKSTART

GUIDE

Quickstart

curl "https://api.eu.apyhub.com/193market/exporter-country-facts-api/countries/:code" \
  -H 'apy-token: $APY_TOKEN'

what you will get

{
  "iso3": "VNM",
  "iso2": "VN",
  "name": "Vietnam",
  "headline": {
    "oecd_grade": 3,
    "oecd_grade_change": "improved",
    "ukef_short_term_cover": "Yes",
    "ukef_medium_long_term_cover": "Yes",
    "rule_of_law_estimate": -0.3139343,
    "inflation_pct": 3.3099931421974,
    "inflation_year": "2025"
  },
  "flags": [
    "reserves_below_3_months"
  ]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the key published facts about a single country using its ISO country code. It brings together country risk, UKEF cover policy, macroeconomic and governance indicators, Enterprise Survey data, MIGA exposure, and relevant flags in one response.

Use it when you need a detailed view of a specific country's export and credit-related conditions.

Path Parameter

ParameterTypeMandatoryDescription
codeStringYesISO 2-letter country code. Example: VN for Vietnam, IN for India, or KR for South Korea.

Important Terms

Short FormFull FormMeaning
OECDOrganisation for Economic Co-operation and DevelopmentProvides country risk classification data.
UKEFUK Export FinanceProvides country cover-policy information.
MIGAMultilateral Investment Guarantee AgencyProvides guarantee exposure data.
WDIWorld Development IndicatorsWorld Bank dataset containing macroeconomic indicators.
WGIWorldwide Governance IndicatorsWorld Bank dataset containing governance indicators.
ISOInternational Organization for StandardizationStandard used for country codes such as VN and VNM.

Response

FieldTypeDescription
iso3StringISO 3-letter country code.
iso2StringISO 2-letter country code.
nameStringCountry name.
headlineObjectKey country figures for quick reference.
headline.oecd_gradeInteger/StringOECD country risk classification. - indicates that no classification is provided.
headline.oecd_grade_changeString/NullChange in the OECD classification, when available.
headline.ukef_short_term_coverString/NullWhether UKEF provides short-term cover for the country.
headline.ukef_medium_long_term_coverString/NullWhether UKEF provides medium- or long-term cover.
headline.rule_of_law_estimateNumberWorld Bank Rule of Law governance estimate.
headline.inflation_pctNumberAnnual consumer-price inflation percentage.
headline.inflation_yearStringYear of the reported inflation value.
flagsArray of StringsThreshold-based flags generated from published figures. These flags are not a country score.
business_environment_surveyObjectEnterprise Survey data covering business and financial conditions.
miga_guarantee_exposureObjectMIGA guarantee exposure information.
oecdObjectOECD country risk classification information and related data.
ukefObjectUKEF country cover policy and related information.
macroObjectWorld Bank macroeconomic indicators.
governanceObjectWorld Bank governance indicators.
▣ ENDPOINT 02 / 04
GET
Compare Countries
https://api.eu.apyhub.com/193market/exporter-country-facts-api/compare

QUICKSTART

GUIDE

Quickstart

curl "https://api.eu.apyhub.com/193market/exporter-country-facts-api/compare?countries=VN,NG,AR,KR" \
  -H 'apy-token: $APY_TOKEN'

what you will get

{
  "countries": [
    {
      "iso3": "VNM",
      "iso2": "VN",
      "name": "Vietnam",
      "found": true,
      "headline": {
        "oecd_grade": 3,
        "oecd_grade_change": "improved",
        "ukef_short_term_cover": "Yes",
        "ukef_medium_long_term_cover": "Yes",
        "rule_of_law_estimate": -0.3139343,
        "inflation_pct": 3.3099931421974,
        "inflation_year": "2025"
      },
      "flags": [
        "reserves_below_3_months"
      ]
    }
  ]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Comma-separated ISO codes, up to 10, e.g. VN,NG,AR,KR

About this endpoint

What it does

Compares headline country figures for up to 10 countries in a single request. It gives you a quick side-by-side view of key indicators such as OECD risk grade, UKEF cover, inflation, reserves, and Rule of Law.

Use it when you want to compare multiple countries quickly.

Query Parameter

ParameterTypeMandatoryDescription
countriesStringYesComma-separated list of ISO 2-letter country codes. Maximum 10 countries. Example: VN,KR,IN,US.

Response

FieldTypeDescription
countriesArrayList of requested countries. Results are returned in the same order as the input.
countries[].iso3StringISO 3-letter country code.
countries[].iso2StringISO 2-letter country code.
countries[].nameStringCountry name.
countries[].foundBooleanIndicates whether data was found for the requested country.
countries[].headlineObjectKey figures for the country.
countries[].headline.oecd_gradeInteger/StringOECD country risk classification.
countries[].headline.oecd_grade_changeString/NullChange in the OECD classification, when available.
countries[].headline.ukef_short_term_coverString/NullUKEF short-term cover status.
countries[].headline.ukef_medium_long_term_coverString/NullUKEF medium- or long-term cover status.
countries[].headline.rule_of_law_estimateNumberWorld Bank Rule of Law governance estimate.
countries[].headline.inflation_pctNumberAnnual consumer-price inflation percentage.
countries[].headline.inflation_yearStringYear of the reported inflation value.
countries[].flagsArray of StringsThreshold-based flags for the country.
▣ ENDPOINT 03 / 04
GET
Indicators, sources and freshness
https://api.eu.apyhub.com/193market/exporter-country-facts-api/indicators

QUICKSTART

GUIDE

Quickstart

curl "https://api.eu.apyhub.com/193market/exporter-country-facts-api/indicators" \
  -H 'apy-token: $APY_TOKEN'

What you'll get back

{
  "indicators": [
    {
      "id": "wdi_inflation_cpi_pct",
      "section": "macro",
      "label": "Inflation, consumer prices (annual %)",
      "unit": "%",
      "source": "wb_indicators",
      "countries": 193,
      "periods": [
        "2011",
        "2025"
      ]
    },
    {
      "id": "wdi_reserves_months_imports",
      "section": "macro",
      "label": "Total reserves in months of imports",
      "unit": "months of imports",
      "source": "wb_indicators",
      "countries": 179,
      "periods": [
        "1982",
        "2025"
      ]
    }
  ]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the complete list of indicators supported by the API.

Use this endpoint to:

  • Discover valid indicator IDs for /rankings.
  • Understand what each indicator measures.
  • Check the unit of measurement.
  • Identify the data source.
  • See the number of countries with available data.
  • See the available reporting periods. This endpoint does not require any parameters.

Response

FieldTypeDescription
indicatorsArrayList of all indicators available through the API.
indicators[].idStringUnique indicator ID. Use this exact value with the /rankings endpoint.
indicators[].sectionStringCategory or section containing the indicator.
indicators[].labelStringHuman-readable name of the indicator.
indicators[].unitStringUnit in which the indicator is measured.
indicators[].sourceStringSource identifier for the underlying dataset.
indicators[].countriesIntegerNumber of countries with available data.
indicators[].periodsArray of StringsAvailable reporting period range for the indicator.

Indicator Terms

Indicator IDMeaning
wdi_inflation_cpi_pctInflation measured by consumer prices, reported as an annual percentage.
wdi_reserves_months_importsTotal reserves expressed in months of imports.
wgi_control_of_corruptionWorld Bank estimate for Control of Corruption.
wgi_political_stabilityWorld Bank estimate for Political Stability and Absence of Violence/Terrorism.
wgi_regulatory_qualityWorld Bank estimate for Regulatory Quality.
wgi_rule_of_lawWorld Bank estimate for Rule of Law.
▣ ENDPOINT 04 / 04
GET
Rank Countries by an Indicator
https://api.eu.apyhub.com/193market/exporter-country-facts-api/rankings

QUICKSTART

GUIDE

Quickstart

curl "https://api.eu.apyhub.com/193market/exporter-country-facts-api/rankings?indicator=wdi_inflation_cpi_pct&order=desc&limit=10" \
  -H 'apy-token: $APY_TOKEN'

what you will get

{
  "indicator": "wdi_inflation_cpi_pct",
  "label": "Inflation, consumer prices (annual %)",
  "unit": "%",
  "order": "desc",
  "note": null,
  "results": [
    {
      "rank": 1,
      "iso3": "VEN",
      "iso2": "VE",
      "name": "Venezuela",
      "value": 254.948534781816,
      "period": "2016",
      "old": true
    },
    {
      "rank": 2,
      "iso3": "ARG",
      "iso2": "AR",
      "name": "Argentina",
      "value": 219.883929014578,
      "period": "2024",
      "old": false
    }
  ]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Indicator id from GET /v1/indicators, e.g. wgi_rule_of_law
1–250
desc (highest first) or asc

About this endpoint

What it does

Returns countries ordered according to a selected indicator. For example, you can rank countries by:

  • Inflation
  • Reserves
  • OECD country risk classification
  • Rule of Law
  • Other indicators supported by the API The indicator parameter must contain an indicator ID returned by the /indicators endpoint.

For example:

wdi_inflation_cpi_pct

Query Parameters

ParameterTypeMandatoryDescription
indicatorStringYesExact indicator ID used to rank countries. Get valid IDs from the /indicators endpoint. Example: wdi_inflation_cpi_pct.
orderStringNoControls ranking direction. desc returns the highest values first. asc returns the lowest values first. Default: desc.
limitIntegerNoMaximum number of countries to return. Minimum: 1. Maximum: 250. Default: 50.

Response

FieldTypeDescription
indicatorStringIndicator ID used for the ranking.
countriesArrayCountries ordered according to the selected indicator.
countries[].iso2StringISO 2-letter country code.
countries[].iso3StringISO 3-letter country code.
countries[].nameStringCountry name.
countries[].valueNumber/String/NullValue of the selected indicator for the country.
countries[].periodString/NullReporting period or year associated with the indicator value.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.