Discover/wits.worldbank.org API
live

wits.worldbank.org APIwits.worldbank.org

Access country trade profiles, bilateral trade data, tariffs, GDP, and World Bank development indicators via the WITS API. 5 endpoints, 266 countries covered.

Endpoints
5
Updated
3mo ago
Try it
Region filter applied as a case-insensitive substring match on the region field. Example v
api.parse.bot/scraper/2f90776c-49cd-4aae-bacb-3de969248392/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/2f90776c-49cd-4aae-bacb-3de969248392/get_country_list' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 5 totalclick to expand

Retrieve the list of countries available in WITS with their ISO3 codes, names, regions, and income groups. Optionally filter by region name (case-insensitive substring match). Returns all 266 countries when no filter is applied.

Input
ParamTypeDescription
regionstringRegion filter applied as a case-insensitive substring match on the region field. Example values: 'Sub-Saharan Africa', 'Europe & Central Asia', 'Middle East & North Africa'. Omit to return all countries.
Response
{
  "type": "object",
  "fields": {
    "count": "integer total number of countries returned",
    "countries": "array of country objects each containing name, iso3, region, and income_group"
  },
  "sample": {
    "data": {
      "count": 48,
      "countries": [
        {
          "iso3": "AGO",
          "name": "Angola",
          "region": "Sub-Saharan Africa",
          "income_group": "Lower middle income"
        },
        {
          "iso3": "BEN",
          "name": "Benin",
          "region": "Sub-Saharan Africa",
          "income_group": "Lower middle income"
        }
      ]
    },
    "status": "success"
  }
}

About the wits.worldbank.org API

The WITS API delivers trade statistics and development indicators from the World Bank's World Integrated Trade Solution platform across 266 countries through 5 endpoints. Use get_country_list to look up ISO3 codes and regional groupings, get_trade_by_partner to retrieve bilateral import/export volumes and trade balances, or get_trade_indicators to pull GDP, GNI, merchandise trade breakdowns, and tariff figures for any country-year pair.

Country Coverage and Lookup

The get_country_list endpoint returns all 266 countries in the WITS database, each with a name, iso3 code, region, and income_group. An optional region parameter filters results by case-insensitive substring match, so querying 'Sub-Saharan' narrows the list to Sub-Saharan African economies. ISO3 codes returned here are the required input for every other endpoint.

Country Trade Profiles

get_country_snapshot returns an at-a-glance trade summary for a given ISO3 code. The response includes summary_stats — a flat object of labeled indicators like total exports, imports, FDI inflows, and average tariff rates — plus top_partners, which maps category headings to ranked arrays of trading partners with associated value_mil figures. get_trade_summary goes deeper: for a specific iso3 and year, it returns multiple structured tables covering top products, top export markets, top import sources, product category breakdowns, market concentration indexes, and GDP indicators.

Bilateral and Indicator Data

get_trade_by_partner accepts an iso3 and year and returns partner-level records containing Reporter, Partner, Import, Export, and MetaData fields, including partner share percentages and trade balance figures. An optional limit parameter caps the number of partner records returned. get_trade_indicators maps a broad set of World Bank indicators — including trade as a percentage of GDP, service trade values, tax data, and GNI figures — to their values for a given country and year, returned as a flat indicators object.

Data Source Notes

WITS aggregates data from UN Comtrade, UNCTAD, and World Bank datasets. Not all country-year combinations have complete data; some indicators or trade tables may return sparse results depending on a country's reporting history. The year parameter accepts four-digit strings and should reflect years for which the country has submitted trade data to the underlying databases.

Common use cases
  • Build a country trade profile dashboard showing exports, imports, FDI, and top partners using get_country_snapshot
  • Analyze bilateral trade balances between specific country pairs with import/export values from get_trade_by_partner
  • Filter countries by income group or region using get_country_list to scope economic research datasets
  • Track GDP, GNI, and trade-as-percent-of-GDP trends over time with get_trade_indicators
  • Compare top export markets and product category breakdowns across years using get_trade_summary tables
  • Identify market concentration and tariff exposure for a given country-year using trade summary indexes
  • Populate country selectors in trade analytics tools with ISO3 codes and region metadata from get_country_list
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does WITS have an official developer API?+
Yes. The World Bank provides the WITS Developer API at https://wits.worldbank.org/witsapiintro.aspx, offering XML-based access to trade and tariff data. It requires registration and covers a narrower set of query patterns than this Parse API.
What does `get_trade_by_partner` return, and how does the `limit` parameter work?+
get_trade_by_partner returns one record per trading partner, each with Reporter, Partner, Import, Export, and a MetaData array containing aggregate trade values and partner share percentages. The optional limit parameter caps how many partner records are included in data; omitting it returns all available partners for that country-year.
Can I retrieve historical time-series data across multiple years in a single call?+
Not currently. Each of get_trade_summary, get_trade_by_partner, and get_trade_indicators accepts a single year per request. To build a time series you would need one call per year. You can fork this API on Parse and revise it to add a multi-year endpoint that loops and aggregates results.
Does the API expose product-level tariff lines or HS code data?+
Not at the individual HS code level. get_trade_summary includes aggregate tariff figures and product category breakdowns, and get_country_snapshot surfaces average tariff rates in summary_stats, but line-level tariff schedules are not currently returned. You can fork this API on Parse and revise it to add an endpoint targeting WITS product-level tariff data.
Are there gaps in country or year coverage?+
Yes. WITS data depends on national statistical reporting to UN Comtrade and other source databases. Some countries have incomplete or delayed submissions, so certain country-year combinations may return sparse tables or missing indicator values. Querying get_country_list confirms which ISO3 codes exist, but it does not indicate which years have data for a given country.
Page content last updated . Spec covers 5 endpoints from wits.worldbank.org.
Related APIs in Government PublicSee all →
identify.plantnet.org API
Identify and explore plant species by searching through Pl@ntNet's comprehensive botanical database to access detailed information like taxonomic families, genera, species descriptions, photos, and community observations. Track plant distributions, view contribution trends, and discover expert contributors within the platform's collaborative plant identification community.
data.lime.bike API
Access real-time availability data for Lime bikes and scooters, including station locations, vehicle status, system alerts, and geofencing zones across multiple cities. Monitor micromobility inventory and service information to find nearby vehicles or plan your trips effectively.
accessdata.fda.gov API
Search and retrieve comprehensive FDA premarket approval information for medical devices, including approval status, supplements, applicant details, and advisory committee data. Get instant access to specific PMA records with all relevant approval information in one place.
eprocurement.gov API
Monitor India's public procurement opportunities by accessing active tenders, bids closing today, global tenders, high-value contracts, and cancelled tenders from the Central Public Procurement Portal. Search tender details, browse participating organizations, and track real-time procurement statistics to stay informed on government contracting opportunities.
cmegroup.com API
Get CME Group market data including FedWatch interest-rate probabilities, futures quotes and settlements, volume/open interest history, and options expirations and near-the-money option chains.
alienvault.com API
Search and analyze global threat intelligence data including indicators of compromise, threat pulses, and adversary profiles from the Open Threat Exchange community. Monitor recent security alerts and access detailed information about threats and adversaries to strengthen your cybersecurity defenses.
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
mahatenders.gov.in API
Access Maharashtra government tenders from mahatenders.gov.in, browsing them by closing date or by organization with full tender details and pagination support. Find and review procurement opportunities across different government departments in one place.