Skip to contents

Main Query Functions

Functions to query foreign trade data

comex_query()
Query general foreign trade data
comex_export()
Query exports
comex_import()
Query imports
comex_query_city()
Query foreign trade data by city
comex_historical()
Query historical foreign trade data

Session Management

Functions to manage browser session for API access

comex_init()
Initialize session for API calls
comex_close()
Close browser session

API Metadata

Functions to get API information

comex_last_update()
Get last data update date
comex_available_years()
Get available years for queries
comex_filters()
Get list of available filters
comex_filter_values()
Get values for a specific filter
comex_details()
Get list of available details
comex_metrics()
Get list of available metrics

Auxiliary Tables - Geography

Functions to query geographic tables

comex_countries()
Get countries table
comex_country_detail()
Get country details
comex_blocs()
Get economic blocs table
comex_states()
Get Brazilian states table
comex_state_detail()
Get state details
comex_cities()
Get Brazilian cities table
comex_city_detail()
Get city details
comex_transport_modes()
Get transport modes table
comex_transport_mode_detail()
Get transport mode details
comex_customs_units()
Get customs units (URF) table
comex_customs_unit_detail()
Get customs unit details

Auxiliary Tables - Products

Functions to query product classification tables

comex_ncm()
Get NCM (Mercosur Common Nomenclature) table
comex_ncm_detail()
Get NCM code details
comex_nbm()
Get NBM (Brazilian Nomenclature of Goods) table
comex_nbm_detail()
Get NBM code details
comex_hs()
Get Harmonized System (HS) tables

Auxiliary Tables - Economic Classifications

Functions to query economic classification tables

comex_cgce()
Get CGCE (Classification by Broad Economic Categories) tables
comex_sitc()
Get SITC (Standard International Trade Classification) tables
comex_isic()
Get ISIC (International Standard Industrial Classification) tables