{
  "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.2",
    "x-build-id": "CnELhdvqRb9uXbYGr"
  },
  "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). Console Test prefills a short wholesale query so Start works without extra fields.",
            "default": "usb cable"
          },
          "searchQueries": {
            "title": "Search queries (batch)",
            "type": "array",
            "description": "Batch keywords for mode=search; fan-out on worker. First used if keyword empty.",
            "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",
            "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 (Unlocker geo aligned)",
            "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",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Max products to return. Console Test prefills 1 listing so a first run stays short. Free plan capped at 200.",
            "default": 1
          },
          "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. 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
          },
          "includeFacets": {
            "title": "Include facets",
            "type": "boolean",
            "description": "Emit brandlist / showFilterVO facet record on list modes",
            "default": false
          },
          "taxonomyDepth": {
            "title": "Taxonomy depth",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "For mode=categories: 1=L1 seed, 2+=crawl child links",
            "default": 1
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional DHgate URLs (search / category / product / store)",
            "items": {
              "type": "string"
            }
          },
          "workerBaseUrl": {
            "title": "Worker base URL override",
            "type": "string",
            "description": "Optional https://*.run.app override (allowlisted). Production uses 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}