{
  "openapi": "3.0.1",
  "info": {
    "title": "TradeKey B2B Wholesale Scraper",
    "description": "Scrape TradeKey.com - a global B2B wholesale marketplace with millions of supplier product listings. Search products by keyword with country/sort/verified-supplier filters, or pull a supplier's full company profile and product catalog.",
    "version": "1.0",
    "x-build-id": "QyMtCeWiFnukVsfXd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~tradekey-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-tradekey-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~tradekey-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-tradekey-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~tradekey-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-tradekey-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byCompanyUrls",
              "byProductUrls",
              "buyLeads"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Keyword to search wholesale product listings for, e.g. `phone case`, `led light`, `garden tools`.",
            "default": "phone case"
          },
          "country": {
            "title": "Supplier country (mode=search)",
            "enum": [
              "",
              "38",
              "223",
              "86",
              "192",
              "207",
              "201",
              "150",
              "208",
              "32",
              "222",
              "173",
              "155",
              "118",
              "195",
              "90",
              "102",
              "163",
              "178",
              "72",
              "65",
              "27",
              "162",
              "128",
              "106",
              "100",
              "1",
              "206",
              "141",
              "243"
            ],
            "type": "string",
            "description": "Only return products from suppliers based in this country.",
            "default": ""
          },
          "sortBy": {
            "title": "Sort by (mode=search)",
            "enum": [
              "relevance",
              "trustpoints"
            ],
            "type": "string",
            "description": "Result ordering.",
            "default": "relevance"
          },
          "verifiedOnly": {
            "title": "Verified suppliers only (mode=search)",
            "type": "boolean",
            "description": "Only emit products from suppliers with a Gold Key / Gold Key Plus verified badge.",
            "default": false
          },
          "minOrderQty": {
            "title": "Min order quantity — minimum (mode=search)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop products whose minimum order quantity is below this number (e.g. `100`). Products without a parseable MOQ are kept."
          },
          "maxOrderQty": {
            "title": "Min order quantity — maximum (mode=search)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop products whose minimum order quantity is above this number. Products without a parseable MOQ are kept."
          },
          "containsKeyword": {
            "title": "Title must contain (mode=search)",
            "type": "string",
            "description": "Case-insensitive substring the product title must contain."
          },
          "companyUrls": {
            "title": "Company URLs or slugs (mode=byCompanyUrls)",
            "type": "array",
            "description": "TradeKey supplier company page URLs, e.g. `https://www.tradekey.com/company/Suzhou-Hengshuo-Imp-and-Exp-Co-Ltd-14108037.html`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs (mode=byProductUrls)",
            "type": "array",
            "description": "TradeKey product detail page URLs, e.g. `https://www.tradekey.com/product_view/Custom-Clear-Phone-Case-11729181.html`. Returns full product-detail fields (place of origin, packaging, supplying ability, payment type, full image gallery) not available on search-result cards.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "buyLeadsQuery": {
            "title": "Buy leads keyword (mode=buyLeads)",
            "type": "string",
            "description": "Keyword to search buyer sourcing requests (RFQs / import requirements) for, e.g. `led light`, `phone case`, `aluminum ingots`. Returns real buyer-posted requirements from importer.tradekey.com, not seller listings.",
            "default": "led light"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records (mode=search: one record per product; mode=byCompanyUrls: one record per resolved company, with that company's product catalog nested inside — `maxItems` caps the number of companies processed, not the nested product count; mode=byProductUrls: one record per resolved product URL; mode=buyLeads: one record per buyer sourcing request, capped at the ~20 leads a single keyword page returns).",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is used automatically as a fallback only if tradekey.com blocks/times-out a direct connection from the run's datacenter IP — most runs complete without touching it. Override only if you need a specific proxy group/country.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}