{
  "openapi": "3.0.1",
  "info": {
    "title": "DHgate Wholesale Scraper | Products Prices MOQ",
    "description": "Scrape DHgate.com wholesale marketplace — keyword search, catalog categories, product PDP (SKU/shipping), and seller stores. Extract itemcode, prices, MOQ, free shipping, supplier URLs & images. Export Excel/CSV/JSON for sourcing & price research.",
    "version": "0.7",
    "x-build-id": "woxHqWEFqfDc221WE"
  },
  "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": [
              "search",
              "category",
              "product",
              "store",
              "categories"
            ],
            "type": "string",
            "description": "search | category | product | store | categories",
            "default": "search"
          },
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Keyword for mode=search (searchkey on /wholesale/search.do). Ignored in category, product and store modes. The Console prefills a short wholesale query so Start works without extra fields."
          },
          "searchQueries": {
            "title": "Search queries (batch)",
            "type": "array",
            "description": "Batch keywords for mode=search. Max results is counted per query. This Actor currently sends one combined worker job, so the combined budget is shared rather than strictly divided per query. When set, this replaces keyword.",
            "items": {
              "type": "string"
            }
          },
          "catalogId": {
            "title": "Catalog / category ID",
            "type": "string",
            "description": "DHgate catalog id e.g. 105 (Cell Phones). Used with search.do?catalog="
          },
          "catalogIds": {
            "title": "Catalog IDs (batch)",
            "type": "array",
            "description": "Batch catalogs for mode=category. Max results is counted per catalog, but the combined no-contract worker-job budget is shared rather than strictly divided per catalog.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrl": {
            "title": "Category SEO URL",
            "type": "string",
            "description": "e.g. https://www.dhgate.com/wholesale/electronics/c103.html — normalized to catalog="
          },
          "itemcode": {
            "title": "Item code",
            "type": "string",
            "description": "DHgate itemcode for mode=product"
          },
          "skuId": {
            "title": "SKU id",
            "type": "string",
            "description": "Optional skuId for PDP AJAX (pcsku / pcskuprice / ship)"
          },
          "productUrl": {
            "title": "Product URL",
            "type": "string",
            "description": "Full PDP URL /product/{slug}/{itemcode}.html"
          },
          "supplierSeq": {
            "title": "Supplier sequence",
            "type": "string",
            "description": "Store supplierSeq for mode=store"
          },
          "storeUrl": {
            "title": "Store URL",
            "type": "string",
            "description": "/store/{seq} or /store/products/{seq}.html"
          },
          "pageNum": {
            "title": "Start page number",
            "minimum": 0,
            "type": "integer",
            "description": "0-based pageNum (DHgate search.do)",
            "default": 0
          },
          "sort": {
            "title": "Sort (sinfo)",
            "type": "string",
            "description": "bestmatch | price | reviews | newest (and other sinfo values)",
            "default": "bestmatch"
          },
          "shipCountry": {
            "title": "Ship-to country",
            "type": "string",
            "description": "shipcountry query, e.g. us, uk, au, de",
            "default": "us"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "dispCurrency for AJAX price/ship (default USD)",
            "default": "USD"
          },
          "freeShipping": {
            "title": "Free shipping filter",
            "type": "boolean",
            "description": "Optional freeshipping filter"
          },
          "minOrder": {
            "title": "Min order filter",
            "type": "string",
            "description": "Optional minorder filter value"
          },
          "wholesaleOnly": {
            "title": "Wholesale only",
            "type": "boolean",
            "description": "Optional wholesaleonly filter"
          },
          "brandId": {
            "title": "Brand ID",
            "type": "string",
            "description": "Optional brandid filter"
          },
          "reviewScore": {
            "title": "Review score filter",
            "type": "string",
            "description": "Optional reviewScore filter"
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Most rows for each keyword, catalog, product URL, or store URL. Default 70; larger numbers remain supported. Products, SKU rows, facets, store About rows and store category rows all count together. Each input in a batch gets up to this many rows of its own. The run stops at your maximum total charge. Free Apify plan: up to 200 rows per run and 10 runs of this Actor.",
            "default": 70
          },
          "enrichDetails": {
            "title": "Enrich product details",
            "type": "boolean",
            "description": "Open PDP for up to enrichLimit list rows (JSON-LD + AJAX when enrichAjax), then follow Store About /store/about-us/{supplierSeq}.html for wholesale leads. In mode=store this also adds one storeAbout row per store (counted in Max results). Enable for deeper records; the Console Test default stays listing-only to fit its 300s run limit.",
            "default": false
          },
          "enrichLimit": {
            "title": "Enrich limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Max list rows to open for PDP enrich (0–50)",
            "default": 0
          },
          "enrichAjax": {
            "title": "Enrich AJAX (SKU/price/ship)",
            "type": "boolean",
            "description": "Call /prod/ajax/pcsku, pcskuprice, ship on product enrich",
            "default": false
          },
          "expandSkus": {
            "title": "One row per SKU",
            "type": "boolean",
            "description": "Return each SKU (color / size / ship-from combination) of an enriched product as its own row (recordType=sku) right after the product: SKU id, attributes, image, inventory, promo and its own price. Each SKU row is one billed result and counts in Max results with the products. Turns on Enrich AJAX. Works in mode=product, and in search/category with Enrich product details and Enrich limit > 0 (half of Max results is then kept for SKU rows). Adds one price request per SKU row.",
            "default": false
          },
          "includeFacets": {
            "title": "Include facets",
            "type": "boolean",
            "description": "Add one facets row (brandlist / showFilterVO) per keyword or catalog, or one store-categories row per store. These rows count in Max results.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Add one review row (recordType=review) per buyer review, counted in Max results. In mode=product, the product's reviews; in mode=store, the seller's reviews. API backend only — no review rows on the web path.",
            "default": false
          },
          "productFilters": {
            "title": "Product filters",
            "type": "object",
            "description": "Keep only search product rows matching every key given, before they count toward Max results. Keys (all optional, unknown ignored): freeShipping, localWarehouse (true/false), minReviewsScore (0-5), minSold (number), brand (case-insensitive text in title or seller name), catalogId. API backend only — the web path ignores it."
          },
          "taxonomyDepth": {
            "title": "Taxonomy depth",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "For mode=categories: 1 = top-level categories, 2 = also their child categories, 3 = also grandchildren (child pages are fetched only while Max results has room)",
            "default": 1
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional dhgate.com URLs (search / category / product / store). Max results is counted per URL, but the combined no-contract worker-job budget is shared rather than strictly divided per URL. These replace the other target fields; the first URL sets the mode and URLs of another kind are skipped.",
            "items": {
              "type": "string"
            }
          },
          "workerBaseUrl": {
            "title": "Worker base URL override",
            "type": "string",
            "description": "Optional allowlisted worker endpoint override. Production uses the control-plane endpoint in Actor env WORKER_BASE_URL."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}