# Wits Worldbank — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive trade statistics, tariffs, and development indicators for countries worldwide through the World Bank's WITS platform. Look up country trade profiles, compare bilateral trade relationships between partners, and analyze key metrics including export/import volumes, tariff rates, GDP, and FDI. Ideal for researching international commerce, trade policy, and economic indicators across any country or region.

**Category:** Government & Public Data | **Website:** [wits.worldbank.org/](https://wits.worldbank.org/) | **Docs:** [parse.bot/marketplace/3417cc21-5ec2-4b5f-a843-f5291933715d/wits-worldbank-org-api](https://parse.bot/marketplace/3417cc21-5ec2-4b5f-a843-f5291933715d/wits-worldbank-org-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/wits-worldbank/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get country list

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. Each country includes its World Bank region classification and income group.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region` | string | No | Region filter applied as a case-insensitive substring match on the region field. Accepted values include 'Sub-Saharan Africa', 'Europe & Central Asia', 'Middle East & North Africa', 'East Asia & Pacific', 'South Asia', 'Latin America & Caribbean', 'North America'. Omit to return all countries. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/wits-worldbank/get-country-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"region":"<string>"}'
```

### Get country snapshot

Retrieve the 'At a Glance' snapshot for a country showing overall trade summary statistics including exports, imports, FDI, tariffs, GDP, and top trading partners. The summary_stats object contains key indicators as label-value pairs. The top_partners object groups partner arrays by category heading (e.g. 'Top 5 Export Markets').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `iso3` | string | Yes | ISO3 country code (e.g. 'NGA' for Nigeria, 'ZAF' for South Africa, 'USA' for United States). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/wits-worldbank/get-country-snapshot \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"iso3":"<string>"}'
```

### Get trade by partner

Retrieve bilateral trade data for a country and year using the WITS Chord API. Returns partner-level import/export values and metadata including number of products traded, partner share percentages, and trade balance. The data array contains per-partner trade flows; the MetaData array contains aggregate country-level trade values.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `iso3` | string | Yes | ISO3 country code of the reporting country (e.g. 'USA' for United States, 'DEU' for Germany). |
| `limit` | integer | No | Maximum number of partner records to return. |
| `year` | string | Yes | Four-digit year for trade data (e.g. '2021'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/wits-worldbank/get-trade-by-partner \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"iso3":"<string>","limit":"<integer>","year":"<string>"}'
```

### Get trade indicators

Retrieve trade and development indicator data for a country and year. Returns a comprehensive set of World Bank indicators including GDP, trade percentages, import/export volumes, service trade, merchandise trade breakdowns, tax data, and GNI figures. Each indicator is a key-value pair in the indicators object.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `iso3` | string | Yes | ISO3 country code (e.g. 'NGA' for Nigeria, 'ZAF' for South Africa). |
| `year` | string | Yes | Four-digit year for indicator data (e.g. '2021'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/wits-worldbank/get-trade-indicators \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"iso3":"<string>","year":"<string>"}'
```

### Get trade summary

Retrieve detailed annual trade summary for a country and year. Returns multiple tables covering exports, imports, top products, top export markets, top import sources, product category breakdown, market concentration indexes, tariff data, and GDP indicators. Each table is an array of row objects with column-header keys.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `iso3` | string | Yes | ISO3 country code (e.g. 'NGA' for Nigeria, 'ZAF' for South Africa). |
| `year` | string | Yes | Four-digit year for trade data (e.g. '2021'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/wits-worldbank/get-trade-summary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"iso3":"<string>","year":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.