{"openapi":"3.1.0","info":{"title":"WTO Data (BYOK) API","version":"0.1.0","description":"WTO Data (BYOK) lets an AI assistant read your own WTO Data data through the WTO Data API with a key you supply (WTO API subscription key). Read-only: 13 tools (list_indicators, get_trade_data, count_trade_datapoints, list_reporters, list_partners, search_products, list_classifications, list_topics, list_hs_versions, search_qr_products, list_quantitative_restrictions,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-wto.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-wto/docs"},"termsOfService":"https://connectorbay.com/byok-wto/terms"},"servers":[{"url":"https://byok-wto.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-wto/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_indicators":{"post":{"operationId":"list_indicators","summary":"List WTO statistical indicators (trade values, tariffs, services, market access) with code, topic, unit, frequency, year","description":"List WTO statistical indicators (trade values, tariffs, services, market access) with code, topic, unit, frequency, years covered and number of reporters. Use for \"Which WTO indicators cover applied MFN tariffs\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Indicator name or part of it, for example 'tariff'.","title":"Name"},"indicator":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"A single indicator code to filter on, or 'all'.","title":"Indicator"},"topic_ids":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated topic ids (see list_topics).","title":"Topic Ids"},"classifications":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Product classification codes, comma-separated, 'all' or 'none'.","title":"Classifications"},"frequency":{"anyOf":[{"enum":["A","S","Q","M","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Frequency: A annual, S semiannual, Q quarterly, M monthly or all.","title":"Frequency"},"language_id":{"anyOf":[{"maximum":3,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Language id: 1 English, 2 French, 3 Spanish.","title":"Language Id"}},"title":"list_indicatorsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_trade_data":{"post":{"operationId":"get_trade_data","summary":"Get WTO time series datapoints for one indicator, optionally by reporting economy, partner, period and product (HS or se","description":"Get WTO time series datapoints for one indicator, optionally by reporting economy, partner, period and product (HS or sector); returns value, unit, year and flags per row. Use for \"What were the applied tariff values reported by the United States for the last few years\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"indicator":{"description":"Indicator code, for example 'TP_A_0010' (find codes with list_indicators).","maxLength":40,"title":"Indicator","type":"string"},"reporters":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Reporting economy codes, comma-separated (see list_reporters), or 'all'. Provider default is all.","title":"Reporters"},"partners":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Partner economy codes, comma-separated (see list_partners), or 'all', where the indicator has partners.","title":"Partners"},"periods":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Years: 'default' (last eight years), 'all', or comma-separated years such as '2022,2023'.","title":"Periods"},"products":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Product or sector codes, comma-separated (see search_products), or 'all'. Defaults to the top-level codes of the indicator's classification.","title":"Products"},"include_subproducts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include all child products of the given product codes.","title":"Include Subproducts"},"max_records":{"anyOf":[{"maximum":2000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum records to return (the provider allows up to 1,000,000; keep small).","title":"Max Records"},"offset":{"anyOf":[{"maximum":10000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip, for paging.","title":"Offset"},"heading_style":{"anyOf":[{"enum":["H","M"],"type":"string"},{"type":"null"}],"default":null,"description":"H for human readable headings, M for machine readable.","title":"Heading Style"},"language_id":{"anyOf":[{"maximum":3,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Language id: 1 English, 2 French, 3 Spanish.","title":"Language Id"}},"required":["indicator"],"title":"get_trade_dataArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/count_trade_datapoints":{"post":{"operationId":"count_trade_datapoints","summary":"Count how many datapoints a get_trade_data query would return, to size a request before fetching it. Use for \"How many d","description":"Count how many datapoints a get_trade_data query would return, to size a request before fetching it. Use for \"How many datapoints exist for indicator TP_A_0010 for all reporters\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"indicator":{"description":"Indicator code, for example 'TP_A_0010' (find codes with list_indicators).","maxLength":40,"title":"Indicator","type":"string"},"reporters":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Reporting economy codes, comma-separated (see list_reporters), or 'all'. Provider default is all.","title":"Reporters"},"partners":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Partner economy codes, comma-separated (see list_partners), or 'all', where the indicator has partners.","title":"Partners"},"periods":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Years: 'default' (last eight years), 'all', or comma-separated years such as '2022,2023'.","title":"Periods"},"products":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Product or sector codes, comma-separated (see search_products), or 'all'. Defaults to the top-level codes of the indicator's classification.","title":"Products"}},"required":["indicator"],"title":"count_trade_datapointsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_reporters":{"post":{"operationId":"list_reporters","summary":"List reporting economies (countries and groups) with the WTO code to use in data queries, ISO3 code and name. Use for \"W","description":"List reporting economies (countries and groups) with the WTO code to use in data queries, ISO3 code and name. Use for \"What is the WTO code for Germany\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Name or part of a name, for example 'germ'.","title":"Name"},"individual_or_group":{"anyOf":[{"enum":["individual","group","all"],"type":"string"},{"type":"null"}],"default":null,"description":"individual, group or all.","title":"Individual Or Group"},"language_id":{"anyOf":[{"maximum":3,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Language id: 1 English, 2 French, 3 Spanish.","title":"Language Id"}},"title":"list_reportersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_partners":{"post":{"operationId":"list_partners","summary":"List partner economies that can be used as trade partners in data queries, with code, ISO3 code and name. Use for \"What ","description":"List partner economies that can be used as trade partners in data queries, with code, ISO3 code and name. Use for \"What is the partner code for China\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Name or part of a name, for example 'china'.","title":"Name"},"language_id":{"anyOf":[{"maximum":3,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Language id: 1 English, 2 French, 3 Spanish.","title":"Language Id"}},"title":"list_partnersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_products":{"post":{"operationId":"search_products","summary":"Search products and sectors (HS codes and service sectors) by name, optionally within a classification; returns the code","description":"Search products and sectors (HS codes and service sectors) by name, optionally within a classification; returns the code to use in data queries and the hierarchy. Use for \"What is the HS code for coffee in the WTO product list\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Product or sector name or part of it, for example 'coffee'.","title":"Name"},"classifications":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Classification codes, comma-separated, or 'all' (see list_classifications).","title":"Classifications"},"language_id":{"anyOf":[{"maximum":3,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Language id: 1 English, 2 French, 3 Spanish.","title":"Language Id"}},"title":"search_productsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_classifications":{"post":{"operationId":"list_classifications","summary":"List the product and sector classifications (such as HS versions) used by WTO indicators. Use for \"Which product classif","description":"List the product and sector classifications (such as HS versions) used by WTO indicators. Use for \"Which product classifications does the WTO API support\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_classificationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_topics":{"post":{"operationId":"list_topics","summary":"List the topics that group WTO indicators (for example merchandise trade, tariffs, services). Use for \"What topics are W","description":"List the topics that group WTO indicators (for example merchandise trade, tariffs, services). Use for \"What topics are WTO indicators grouped under\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_topicsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_hs_versions":{"post":{"operationId":"list_hs_versions","summary":"List the HS nomenclature versions known to the WTO quantitative restrictions database. Use for \"Which HS versions does t","description":"List the HS nomenclature versions known to the WTO quantitative restrictions database. Use for \"Which HS versions does the WTO quantitative restrictions database use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_hs_versionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_qr_products":{"post":{"operationId":"search_qr_products","summary":"Search products in the quantitative restrictions database by HS version and code prefix or description. Use for \"What HS","description":"Search products in the quantitative restrictions database by HS version and code prefix or description. Use for \"What HS 2022 products start with 0901 in the WTO quantitative restrictions database\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"hs_version":{"description":"HS version: h1 to h7.","enum":["h1","h2","h3","h4","h5","h6","h7"],"title":"Hs Version","type":"string"},"code":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Product code or code prefix to match.","title":"Code"},"description":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in product descriptions.","title":"Description"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["hs_version"],"title":"search_qr_productsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_quantitative_restrictions":{"post":{"operationId":"list_quantitative_restrictions","summary":"List import and export prohibitions and restrictions (quantitative restrictions) notified to the WTO, by reporting membe","description":"List import and export prohibitions and restrictions (quantitative restrictions) notified to the WTO, by reporting member, year in force and product codes. Use for \"Which quantitative restrictions on product 8703 are in force\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"reporter_member_code":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"WTO member code of the reporting country.","title":"Reporter Member Code"},"in_force_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only restrictions currently in force.","title":"In Force Only"},"year_of_entry_into_force":{"anyOf":[{"maximum":2100,"minimum":1950,"type":"integer"},{"type":"null"}],"default":null,"description":"Only restrictions that entered into force in this year.","title":"Year Of Entry Into Force"},"product_codes":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated product codes or code prefixes, matched in any HS version.","title":"Product Codes"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_quantitative_restrictionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_quantitative_restriction":{"post":{"operationId":"get_quantitative_restriction","summary":"Get one quantitative restriction with its historical versions. Use for \"Show the details of WTO quantitative restriction","description":"Get one quantitative restriction with its historical versions. Use for \"Show the details of WTO quantitative restriction number 1000\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"qr_id":{"description":"Numeric id of the restriction (from list_quantitative_restrictions).","title":"Qr Id","type":"integer"}},"required":["qr_id"],"title":"get_quantitative_restrictionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_eping_notifications":{"post":{"operationId":"search_eping_notifications","summary":"Search SPS and TBT notifications in ePing (product standards and food safety measures) by date, member, HS code, ICS cod","description":"Search SPS and TBT notifications in ePing (product standards and food safety measures) by date, member, HS code, ICS code or free text. Use for \"Which TBT or SPS notifications mention coffee since 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Language: 1 English, 2 French, 3 Spanish.","enum":["1","2","3"],"title":"Language","type":"string"},"domain_ids":{"anyOf":[{"enum":["1","2"],"type":"string"},{"type":"null"}],"default":null,"description":"1 for TBT only, 2 for SPS only (both when empty).","title":"Domain Ids"},"document_symbol":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Part of a document symbol, for example 'USA/1234'.","title":"Document Symbol"},"distribution_date_from":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Issued on or after this date (yyyy-MM-dd).","title":"Distribution Date From"},"distribution_date_to":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Issued on or before this date (yyyy-MM-dd).","title":"Distribution Date To"},"hs":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"HS codes, comma-separated.","title":"Hs"},"ics":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"ICS codes, comma-separated.","title":"Ics"},"free_text":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Any term related to the notification.","title":"Free Text"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Notifications per page (maximum 100).","title":"Page Size"}},"required":["language"],"title":"search_eping_notificationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}