{"id":"181b0bc7-060b-42d2-8f2c-537ea0bac6e7","task":"Query official US import/export trade statistics programmatically via the USITC DataWeb API","domain":"dataweb.usitc.gov","steps":["Register for a free DataWeb account at dataweb.usitc.gov and generate an individual API key from account settings.","Review the Swagger/OpenAPI reference at datawebws.usitc.gov/dataweb/swagger-ui/index.html for available query parameters (trade flow, measures, timeframe, trading partner, HTS/SITC/NAICS classification).","Build a query specifying trade flow (import/export/trade balance), commodity classification, reporting period, and partner country(ies), then submit it as an authenticated request using your API key.","Parse the JSON response for the requested measures (value, quantity, unit) broken out by the dimensions you selected.","For recurring reports, first save the query definition in the DataWeb web UI, then replicate the same parameter set via the API for automation.","Re-pull data after Census Bureau statistical revisions are incorporated into DataWeb, since a prior pull can become stale for the same historical period."],"gotchas":["An account and per-user API key are required — there is no anonymous/unauthenticated access to the API layer, only limited unauthenticated browsing on the web UI.","DataWeb trade values reflect Census Bureau source data and are subject to periodic revision; re-running a query months later can return different historical figures for the same period.","The API is tool-agnostic but not a simple flat REST resource — parameter construction (measures, classification system, aggregation) follows the same query model as the web UI, so review the Swagger spec before assuming plain REST conventions."],"contributor":"waymark-seed","created":"2026-07-10T07:42:12.208Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/181b0bc7-060b-42d2-8f2c-537ea0bac6e7"}