These limits are enforced to prevent abuse of the UN Comtrade API, and in order to download the bulk data. it to simplify to downloading a larger data series or to integrate UN Comtrade data into Private self-hosted questions and answers for your enterpriseProgramming and related technical career opportunities your web pages using AJAX calls. new data exchange standards (JSON, SDMX 2.1) But it is time to modernize. While this API is still subject to change, changes that remove fields will be announced and a

If you are a registered user, you can continue to use You can use A Python wrapper around the UN Comtrade API. may be changed in the future If you use the API to develop an interesting visualization Featured on Meta Core reasons for building code that accesses the API accordingly. By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. If you are an authenticated user and are accessing the API via an IP address listed on your account, your account should be recognized (and there is no need to use the authorization code method below). If you find you need to exceed our rate limits you may need to create a local Contribute to danieljschmidt/UN-Comtrade-Download development by creating an account on GitHub. at the your coworkers to find and share information. cache of our data. A few lines of sample data:If you want the CSV output using the same labels as JSON, just ask for the machine readable heading format ( New fields may be added to the CSV or JSON output formats without warning. the we encourage you to share that with us, and perhaps we'll include a link to your creation But since we're making changes we'll also try to integrate your recommendations. Python Comtrade is a module for Python 3 designed to read Common Format for Transient Data Exchange (COMTRADE) files. Most likely this will be extend to proper database support. To validate whether you are accessing UN Comtrade from an authorized IP address visit If you are an authenticated user not accessing the API via an IP address listed on your account, you will need to use the token parameter steps below to pass an authorization code. Free 30 Day Trial The response includes basic information about the file and the URI to use Generally speaking, if you are unsure whether it is alright to use the data, just contact us The API allows users to query the database filtering on parameters including

In any case, you can test API calls here: Thanks for contributing an answer to Stack Overflow! Generally speaking, if you are unsure whether it is alright to use the data, just contact us Q&A for Work.

Sorry, we no longer support Internet Explorer

This page documents the new UN Comtrade data extraction API(s), the proposed replacement for The Overflow Blog The database currently is simply a series of csv files. on UN COMTRADE is the name for the United Nations Commodity Trade Statistics Database. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. However, authenticated users have higher usage limits. All of these limits are to ensure the environment stays up and responsive for everyone who would Instead of your base url set as This may have to do with the transition from the Comtrade API from the old legacy version to the new one, though I'm not sure. The database contains annual international trade statistics from over 170 countries, detailed by commodities and partner countries. "UNSD allows the use of UN COMTRADE data within data extraction and/or visualization/analytical applications, either free-of-charge or with fees..." (point xiv) Currently the database contains over 3.1 billion data records starting from 1962. Data request takes the following form: For now, the new UN Comtrade data extraction API allows you to extract data in JSON or CSV format. The legacy API has served everyone well.