Docs/APIs/Trade Balance

Trade Balance

US International Trade Data

OperationalCredits 2 per callp50 475msFinanceStar

Overview

Trade Balance sources data from FRED (Federal Reserve Economic Data) using the Census Bureau FT-900 Balance of Payments series, providing seasonally adjusted monthly exports, imports, and the trade balance in millions of US dollars, with history back to 1992. With changes=true every reading includes the previous month's balance, and paid plans add the percent change in exports and imports from the month before and the year before, the change in the balance, rolling 12-month exports, imports and balance, and the 12 monthly readings with history=true. Track the US balance of trade, the trade deficit or surplus, and imports and exports month by month.

Live Test Trade Balance API →

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/tradebalance
curl "https://api.apiverve.com/v1/tradebalance?date=2023-06&history=true&changes=true" \
  -H "x-api-key: your_api_key_here"

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
dateOptionalstringOptional date in YYYY-MM format for historical lookup. Omit for current data.
date
historyOptionalPremiumbooleanInclude the 12 monthly readings ending at the returned month
changesOptionalbooleanInclude the previous month's balance, month-on-month and year-on-year changes and rolling 12-month totals

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "status": "ok",
  "error": null,
  "data": {
    "yearMonth": "2026-08",
    "year": 2026,
    "month": 8,
    "exports": 315182,
    "imports": 420754,
    "balance": -105572,
    "unit": "millions_usd",
    "exportsFormatted": "$315.18 billion",
    "importsFormatted": "$420.75 billion",
    "balanceFormatted": "-$105.57 billion",
    "tradeStatus": "deficit",
    "updatedAt": "2026-10-28T03:39:54.665Z",
    "previousYearMonth": "2026-07",
    "previousBalance": -92826,
    "exportsChange1m": 1.435,
    "importsChange1m": 4.2632,
    "balanceChange1m": -12746,
    "exportsChange12m": 10.6908,
    "importsChange12m": 22.1762,
    "balanceChange12m": -45930,
    "exports12m": 3697470,
    "imports12m": 4491225,
    "balance12m": -793756,
    "history": [
      {
        "yearMonth": "2025-09",
        "exports": 292352,
        "imports": 351743,
        "balance": -59392
      },
      {
        "yearMonth": "2025-10",
        "exports": 301158,
        "imports": 338534,
        "balance": -37376
      },
      {
        "yearMonth": "2025-11",
        "exports": 289504,
        "imports": 353372,
        "balance": -63868
      },
      {
        "yearMonth": "2025-12",
        "exports": 285282,
        "imports": 361360,
        "balance": -76078
      },
      {
        "yearMonth": "2026-01",
        "exports": 301271,
        "imports": 353941,
        "balance": -52670
      },
      {
        "yearMonth": "2026-02",
        "exports": 313628,
        "imports": 366127,
        "balance": -52500
      },
      {
        "yearMonth": "2026-03",
        "exports": 321163,
        "imports": 374820,
        "balance": -53657
      },
      {
        "yearMonth": "2026-04",
        "exports": 329893,
        "imports": 382776,
        "balance": -52883
      },
      {
        "yearMonth": "2026-05",
        "exports": 319979,
        "imports": 395731,
        "balance": -75752
      },
      {
        "yearMonth": "2026-06",
        "exports": 317335,
        "imports": 388517,
        "balance": -71182
      },
      {
        "yearMonth": "2026-07",
        "exports": 310723,
        "imports": 403550,
        "balance": -92826
      },
      {
        "yearMonth": "2026-08",
        "exports": 315182,
        "imports": 420754,
        "balance": -105572
      }
    ]
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
yearMonthstring"2026-08"Year and month in YYYY-MM format for the trade data
yearnumber2026The calendar year for the trade balance data
monthnumber8The month number (1-12) for trade balance data
exportsnumber315182US exports of goods and services for the month, in millions of USD (BOP basis, seasonally adjusted)
importsnumber420754US imports of goods and services for the month, in millions of USD (BOP basis, seasonally adjusted)
balancenumber-105572Trade balance (exports minus imports) for the month, in millions of USD. Negative means a trade deficit
unitstring"millions_usd"Unit for the exports, imports, and balance figures (millions_usd)
exportsFormattedPremiumstring"$315.18 billion"Human-readable exports figure (e.g., $265.20 billion)
importsFormattedPremiumstring"$420.75 billion"Human-readable imports figure (e.g., $340.40 billion)
balanceFormattedPremiumstring"-$105.57 billion"Human-readable trade balance figure (e.g., -$75.20 billion)
tradeStatusstring"deficit"Whether the month was a trade deficit or surplus
updatedAtstring"2026-10-28T03:39:54.665Z"ISO 8601 timestamp when the trade data was last updated
previousYearMonthstring"2026-07"Month of the previous reading (YYYY-MM) (with changes=true)
previousBalancenumber-92826Previous month's trade balance in millions of USD (with changes=true)
exportsChange1mPremiumnumber1.435Percent change in exports from the previous month (with changes=true)
importsChange1mPremiumnumber4.2632Percent change in imports from the previous month (with changes=true)
balanceChange1mPremiumnumber-12746Change in the balance from the previous month, in millions of USD (negative means a wider deficit or smaller surplus) (with changes=true)
exportsChange12mPremiumnumber10.6908Percent change in exports from the same month a year earlier (with changes=true)
importsChange12mPremiumnumber22.1762Percent change in imports from the same month a year earlier (with changes=true)
balanceChange12mPremiumnumber-45930Change in the balance from the same month a year earlier, in millions of USD (with changes=true)
exports12mPremiumnumber3697470Total exports over the 12 months ending at the returned month, in millions of USD (with changes=true)
imports12mPremiumnumber4491225Total imports over the 12 months ending at the returned month, in millions of USD (with changes=true)
balance12mPremiumnumber-793756Total balance over the 12 months ending at the returned month, in millions of USD (with changes=true)
historyPremiumarray[12]The 12 monthly readings ending at the returned month, oldest first (when history=true)
yearMonthPremiumstring"2025-09"Month of the reading (YYYY-MM)
exportsPremiumnumber292352Exports in millions of USD
importsPremiumnumber351743Imports in millions of USD
balancePremiumnumber-59392Trade balance in millions of USD

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

Use cases

Economic Analysis
Track US trade patterns for economic research
Policy Research
Analyze trade data for policy research and analysis
Business Intelligence
Factor trade trends into business planning

Other ways to use Trade Balance

Set up Trade Balance on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →Reference →
Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheets →Reference →
Ground an agent on itA cited, machine-checkable fact your model can't produce on its own.VerveContext →Reference →

More in Finance:

Was this page helpful?