API Authentication

API Authentication

Welcome to the OEC API, your gateway to accessing one of the most comprehensive sources of international and subnational trade data. The API enables developers, researchers, journalists, and businesses to programmatically access a wide variety of economic data, including trade flows, product classifications, and country-level or region-level statistics.

The OEC API supports both unauthenticated and authenticated access, depending on the type of data you're requesting.

Unauthenticated Access

You can make many basic queries without any authentication. These include public datasets such as historical trade flows between countries, product metadata, and general classification structures. This is ideal for casual use, initial testing, and exploration.

Pro & Premium Access

Some endpoints require a Pro or Premium subscription. These include:

  • Access to the latest available data
  • Subnational-level data (e.g., exports by U.S. states, prefectures of Japan, etc.)
  • Advanced calculation endpoints

To use these endpoints, you'll need to:

  1. Sign up for a Pro or Premium account on the OEC website.
  2. Retrieve your API token from your account page.

Using Your API Token

To authenticate your requests, pass your token among the other parameters in the request, as a query parameter, under the token key:

https://api-v2.oec.world/endpoint?token=API_TOKEN
โš ๏ธ Note: API tokens are personal and should be kept secure. Do not expose them in public repositories or client-side code, and always use them with https:// URLs.
Have questions, comments, or concerns?
Send us an e-mail: support@oec.world
Follow @OECtoday on
Created, Designed, and Developed by:
In collaboration with