United States Census Bureau International API

International demographic and trade data

Operations 2

GET /{year}/intltrade/imp_exp Get International Trade Data #
GET /{year}/idb/5year Get International Database #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/united-states-census-bureau-international-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

united-states-census-bureau-international-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Census Data American Community Survey International API
  description: The United States Census Bureau Data API provides programmatic access to statistical data from Census Bureau surveys and datasets. The API covers demographic, economic, housing, and social data through a query-based interface. Key datasets include the American Community Survey (ACS), Decennial Census, Population Estimates, County Business Patterns, and many more. Users can query data by geographic level (national, state, county, tract, block group) and filter by hundreds of statistical variables. An API key is optional (up to 500 requests/day without one) but required for higher usage.
  version: 2.0.0
  contact:
    name: Census Developer Forum
    url: https://www.census.gov/data/developers.html
    email: cnmp.developers.list@census.gov
  x-tags:
  - Demographics
  - Federal Government
  - Open Data
  - Statistics
servers:
- url: https://api.census.gov/data
  description: Census Data API
tags:
- name: International
  description: International demographic and trade data
paths:
  /{year}/intltrade/imp_exp:
    get:
      operationId: getInternationalTrade
      summary: Get International Trade Data
      description: Returns monthly and annual statistics on U.S. imports and exports by commodity, country, and port. Data available from 2010 to present.
      tags:
      - International
      parameters:
      - name: year
        in: path
        required: true
        description: Data year (2010-present)
        schema:
          type: integer
      - name: get
        in: query
        required: true
        description: Variable names (e.g., CTY_NAME,AIR_VAL_MO for country and airborne value)
        schema:
          type: string
      - name: for
        in: query
        required: false
        description: Geographic filter
        schema:
          type: string
      - name: key
        in: query
        required: false
        description: Census API key
        schema:
          type: string
      responses:
        '200':
          description: 2D JSON array of international trade data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAPIResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{year}/idb/5year:
    get:
      operationId: getInternationalDatabase
      summary: Get International Database
      description: Returns demographic data for countries and areas with populations of 5,000 or more. Includes historical and projected data through 2100 with population by age and sex, births, deaths, migration, and more.
      tags:
      - International
      parameters:
      - name: year
        in: path
        required: true
        description: Data year
        schema:
          type: integer
      - name: get
        in: query
        required: true
        description: Variable names (e.g., NAME,POP for country name and population)
        schema:
          type: string
      - name: for
        in: query
        required: false
        description: Geographic filter (e.g., country:01 for Afghanistan)
        schema:
          type: string
      - name: key
        in: query
        required: false
        description: Census API key
        schema:
          type: string
      responses:
        '200':
          description: 2D JSON array of international demographic data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAPIResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  responses:
    BadRequest:
      description: Bad request — invalid parameters, missing required fields, or variable not found
      content:
        text/html:
          schema:
            type: string
  schemas:
    DataAPIResponse:
      type: array
      description: A 2D JSON array where the first element is an array of variable names (headers) and each subsequent element is an array of corresponding data values. The last elements in each row are typically geography codes.
      items:
        type: array
        description: A single data row (header row or data row)
        items:
          type: string
          nullable: true
      example:
      - - NAME
        - B01003_001E
        - state
      - - Alabama
        - '5024279'
        - '01'
      - - Alaska
        - '733391'
        - '02'
      - - Arizona
        - '7151502'
        - '04'
externalDocs:
  description: Census Data API User Guide
  url: https://www.census.gov/data/developers/guidance/api-user-guide.html