{
  "openapi": "3.0.1",
  "info": {
    "title": "DHgate Scraper - Wholesale Products, Prices & Sellers",
    "description": "Extract DHgate wholesale products, prices, minimum order quantities and seller details. Search keywords, categories or stores, with optional SKU and review rows. Pay per delivered row plus a start fee.",
    "version": "0.7",
    "x-build-id": "07FAEpXVjuRJQBz4L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~dhgate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-dhgate-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/lentic_clockss~dhgate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-dhgate-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/lentic_clockss~dhgate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-dhgate-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "search",
              "category",
              "product",
              "store",
              "categories",
              "discover",
              "hotkeywords"
            ],
            "type": "string",
            "description": "Choose what to collect, or leave auto to select a mode from the target field you fill. Category tree mode needs no target.",
            "default": "auto"
          },
          "feed": {
            "title": "Feed",
            "type": "string",
            "description": "Discovery feed mode only: channel, youviewed, referlist, aiad, premiumselect, index2024, jfyviewed or lines (comma list allowed). Leave empty or all to read every feed."
          },
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Product terms for keyword search. The input form uses usb cable as an example; other modes ignore the keyword."
          },
          "searchQueries": {
            "title": "Search queries (batch)",
            "type": "array",
            "description": "A list of keywords to search in one run, replacing keyword. maxResults applies to each keyword within the whole-run cost and row limits.",
            "items": {
              "type": "string"
            }
          },
          "catalogId": {
            "title": "Catalog / category ID",
            "type": "string",
            "description": "DHgate category ID, for example 105. Use it alone for category products, or with a keyword to narrow a search."
          },
          "catalogIds": {
            "title": "Catalog IDs (batch)",
            "type": "array",
            "description": "A list of DHgate category IDs. maxResults applies to each category within the whole-run cost and row limits.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrl": {
            "title": "Category URL",
            "pattern": "^\\s*(https?://)?([A-Za-z0-9-]+\\.)*dhgate\\.com(/.*)?\\s*$",
            "type": "string",
            "description": "A DHgate category link, such as https://www.dhgate.com/wholesale/electronics/c103.html. The Actor reads the category ID from the link."
          },
          "itemcode": {
            "title": "Item code",
            "type": "string",
            "description": "DHgate product identifier for product details. Enter the numeric item code from the product link."
          },
          "skuId": {
            "title": "SKU ID",
            "type": "string",
            "description": "Optional variant ID for product details. It does not guarantee a single-variant response or make the parent price the variant price."
          },
          "productUrl": {
            "title": "Product URL",
            "pattern": "^\\s*(https?://)?([A-Za-z0-9-]+\\.)*dhgate\\.com(/.*)?\\s*$",
            "type": "string",
            "description": "A DHgate product link shaped like https://www.dhgate.com/product/<slug>/<itemcode>.html."
          },
          "supplierSeq": {
            "title": "Seller ID",
            "type": "string",
            "description": "Seller identifier for store products, found in a DHgate store link after /store/."
          },
          "storeUrl": {
            "title": "Store URL",
            "pattern": "^\\s*(https?://)?([A-Za-z0-9-]+\\.)*dhgate\\.com(/.*)?\\s*$",
            "type": "string",
            "description": "A DHgate store link, such as https://www.dhgate.com/store/21290366 or https://www.dhgate.com/store/products/21290366.html."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "DHgate search, category, product or store links, replacing other targets. The first link selects the mode; links of another kind are skipped, and maxResults applies per accepted link within the run limits.",
            "items": {
              "type": "string"
            }
          },
          "seenItemcodes": {
            "title": "Seen item codes (incremental stop)",
            "type": "array",
            "description": "Search and category runs with sort newest: stop at the first product whose item code is in this list, so only newer products are returned.",
            "items": {
              "type": "string"
            }
          },
          "minItemcode": {
            "title": "Minimum item code (watermark)",
            "type": "string",
            "description": "Search and category runs with sort newest: stop at the first product whose item code is not above this watermark, so only newer products are returned."
          },
          "pageNum": {
            "title": "Start page number",
            "minimum": 0,
            "type": "integer",
            "description": "Starting page for listings, counting from 0. Use this field rather than inventing category page URLs.",
            "default": 0
          },
          "sort": {
            "title": "Sort order",
            "type": "string",
            "description": "Listing order: bestmatch, price, reviews, orders or newest. Support depends on the selected listing.",
            "default": "bestmatch"
          },
          "shipCountry": {
            "title": "Ship-to country",
            "type": "string",
            "description": "Ship-to destination code, such as us, uk, au or de (ISO gb is normalized to uk). Shipping availability still depends on the product and seller.",
            "default": "us"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Requested currency for product price and shipping details, such as USD. Availability depends on the source.",
            "default": "USD"
          },
          "freeShipping": {
            "title": "Free shipping filter",
            "type": "boolean",
            "description": "Request listings marked as offering free shipping. Verify the returned flag for the chosen destination."
          },
          "minOrder": {
            "title": "Minimum order filter",
            "type": "string",
            "description": "Optional DHgate minimum-order filter value. Support depends on the listing."
          },
          "wholesaleOnly": {
            "title": "Wholesale only",
            "type": "boolean",
            "description": "Request wholesale listings where the selected listing supports this filter."
          },
          "brandId": {
            "title": "Brand ID",
            "type": "string",
            "description": "Optional DHgate brand identifier to narrow supported listings."
          },
          "reviewScore": {
            "title": "Review score filter",
            "type": "string",
            "description": "Optional DHgate review-score filter value; it is not applied in every collection case. Use productFilters.minReviewsScore when you need a minimum search-row score, and verify the returned rows."
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Most rows per keyword, category or URL: default 70, maximum 500, with larger requests collected in parts of 70. All row types count together; the run also respects your maximum cost and the Free plan limits of 200 rows per run and 10 runs of this Actor.",
            "default": 70
          },
          "enrichDetails": {
            "title": "Enrich product details",
            "type": "boolean",
            "description": "Add available product and seller details to list rows, using enrichLimit for product details. In store mode, this can also add a billed storeAbout row within maxResults.",
            "default": false
          },
          "enrichLimit": {
            "title": "Enrich limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum list products to enrich, from 0 to 50. Set above 0 with enrichDetails to add product details to search or category rows.",
            "default": 0
          },
          "enrichAjax": {
            "title": "Extra variant, price and shipping details",
            "type": "boolean",
            "description": "Request available variant, price and shipping details for product lookups or enriched list products. Missing details remain absent.",
            "default": false
          },
          "expandSkus": {
            "title": "One row per SKU",
            "type": "boolean",
            "description": "Add one billed row per available SKU, sharing maxResults with products; this also enables enrichAjax. For search or category listings, enable enrichDetails and set enrichLimit above 0; half the row allowance is then reserved for SKU rows.",
            "default": false
          },
          "includeFacets": {
            "title": "Include facets",
            "type": "boolean",
            "description": "Add available search/category filter information or a seller category list as a separate billed row. These rows share maxResults with products.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Add available buyer reviews as separate billed rows in product or store mode. Reviews share maxResults with other rows and may be unavailable for some products or sellers.",
            "default": false
          },
          "productFilters": {
            "title": "Product filters",
            "type": "object",
            "description": "Search-row conditions: freeShipping, localWarehouse, minReviewsScore, minSold, brand text or catalogId; unknown keys are ignored. Matching rows must satisfy every supplied condition, but these filters are not applied in every collection case."
          },
          "scrapeBackend": {
            "title": "Collection preference",
            "enum": [
              "auto",
              "api",
              "web"
            ],
            "type": "string",
            "description": "Selects the collection path: auto uses the API where it is wired and falls back to web pages; api uses the API only; web uses web pages only.",
            "default": "auto"
          },
          "searchChannel": {
            "title": "Search channel",
            "enum": [
              "index",
              "seo"
            ],
            "type": "string",
            "description": "Selects the search list source: index is the standard search; seo is the denser search channel with 48 products per page.",
            "default": "index"
          },
          "includeLegalName": {
            "title": "Include legal name",
            "type": "boolean",
            "description": "Requests the seller's legal company name from the store page when it is available. The legal name is not guaranteed for every seller.",
            "default": false
          },
          "seedFamily": {
            "title": "Developer test setting",
            "type": "string",
            "description": "Advanced developer setting: controls which discovery families the run may record (all, none, or a comma list of catalog, brand, supplier, keyword). Leave at the default all.",
            "default": "all"
          },
          "taxonomyDepth": {
            "title": "Taxonomy depth",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Category tree depth: 1 for top-level categories, 2 to include children, or 3 to include grandchildren. Collection stops at maxResults.",
            "default": 1
          },
          "workerBaseUrl": {
            "title": "Developer test URL",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          },
          "cursor": {
            "title": "Continue from cursor",
            "type": "string",
            "description": "Continue a run that stopped at its time limit or was aborted gracefully: paste RUN_SUMMARY.nextCursor from that run and keep the rest of the input the same. A cursor works once and is valid for 6 hours. Usually leave empty."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}