{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Product Detail Scraper - Prices, MOQ, Stock, SKU Tiers",
    "description": "[💰$0.10/1K] 1688 product detail scraper. Input: offer IDs, offer links or keywords. Each row keeps the price ladder with MOQ and stock; SKU prices; attributes; weight; services; shop ratings; images and video; description URL; optional price history. Public JSON API, CN proxy, no login, no key.",
    "version": "0.13",
    "x-build-id": "gVvh4mVSa1B5z9jfY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ai-lead-gen-tools~1688-product-detail-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ai-lead-gen-tools-1688-product-detail-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/ai-lead-gen-tools~1688-product-detail-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ai-lead-gen-tools-1688-product-detail-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/ai-lead-gen-tools~1688-product-detail-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ai-lead-gen-tools-1688-product-detail-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": {
          "offerIds": {
            "title": "Offer ids",
            "type": "array",
            "description": "1688 offer ids, one per entry. A bare number, a mobile link or a desktop link all work: only the id is used and the desktop address is never requested. Every entry produces one detail record and costs one `offer-detail` event.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "offerUrls": {
            "title": "Offer links",
            "type": "array",
            "description": "Full 1688 links, one per entry, for pasting a whole page of products. The id is read out of the link and the rest is ignored, so `m.1688.com/offer/<id>.html` and `detail.1688.com/offer/<id>.html` behave the same. Links and ids are merged and deduplicated before the run starts.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Chinese or English search terms, one target per entry. A keyword run searches 1688, opens every listing card it finds as a full detail record and keeps the listing card it came from, so shop metrics and category are filled in as well. Keywords are sent to 1688 in GBK; a term with characters outside GBK is skipped with a clear message instead of being sent as garbage.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Max detail records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on detail records for the whole run, shared across offer ids and keywords. One detail record costs one request, so this is the number that drives both the runtime and the spend. The run stops requesting as soon as the cap is reached.",
            "default": 100
          },
          "maxResults": {
            "title": "Max records per keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap for a single keyword, so one broad term cannot eat the whole budget. Listing pages come 60 cards at a time and each card is opened as its own detail record.",
            "default": 60
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "quick",
              "full"
            ],
            "type": "string",
            "description": "How much work one record is. `quick` reads the detail page only: price, price tiers, MOQ, stock, variants, attributes, weight and services. `full` adds the long description, the shop metrics from the search card, the review summary and the optional translation and price history. Quick is the cheap mode when you only need numbers.",
            "default": "full"
          },
          "includeDescriptionHtml": {
            "title": "Include description HTML",
            "type": "boolean",
            "description": "Put the raw product description HTML into the record, next to the list of description images. The description is served from the image CDN and opens without a login. It is one extra request per record and it makes the dataset large, so it is off by default; `descriptionUrl`, `descriptionImages` and `descriptionLength` are filled either way.",
            "default": false
          },
          "reviews": {
            "title": "Collect reviews",
            "type": "boolean",
            "description": "Attach the review summary and the latest review texts to every record. 1688 returns one summary plus at most two review entries per offer in a single request, with no pagination: `reviewCountText` is the rounded counter shown on the offer card, `reviewCountTextExact` is the number of reviews that actually carry text, and the two are never swapped. Turning this off saves one request per record.",
            "default": true
          },
          "translate": {
            "title": "Translate titles",
            "type": "boolean",
            "description": "Add `titleEn` next to the Chinese title of every record, so a row can be read without a translator. The translation goes through a free endpoint, costs no extra 1688 request and never fails the row: when the endpoint is down the field stays null and the counter `translateFailed` goes up.",
            "default": false
          },
          "translateTo": {
            "title": "Translate to",
            "enum": [
              "en",
              "ru"
            ],
            "type": "string",
            "description": "Target language of the translated title. Only used when `translate` is on.",
            "default": "en"
          },
          "trackHistory": {
            "title": "Track price history",
            "type": "boolean",
            "description": "Store the price and stock of every offer in the run key-value store and report `priceHistory`, `stockHistory`, `priceChange` and `firstSeenAt` on the record. A point is written only when the price or the stock actually changed, up to 100 points per offer, so repeated scheduled runs build a real timeline instead of a list of identical stamps.",
            "default": false
          },
          "skipProcessed": {
            "title": "Skip processed offers",
            "type": "boolean",
            "description": "Remember which offers this actor already returned and skip them on the next run, so a scheduled run keeps walking through a large list instead of opening the same offers again. The ledger is per Task and only a run started by a saved Task reads or writes it: a run from the Console or the API keeps the list in memory for that run only, so replaying the same input returns the same rows. The counter `skippedProcessed` in the summary reports how many were skipped.",
            "default": false
          },
          "excludeAds": {
            "title": "Exclude ads",
            "type": "boolean",
            "description": "Drop paid listing cards from keyword runs. 1688 repeats a sponsored card as a second entry with the same offer id, so the row is deduplicated anyway; this switch decides whether that card is opened at all. Turning it off keeps sponsored offers and their detail records.",
            "default": true
          },
          "maxTotalChargeUsd": {
            "title": "Max spend per run",
            "minimum": 0.01,
            "type": "number",
            "description": "Spending cap for this run in US dollars, checked before every paid event. The actor stops once the next event would cross the cap, keeps everything it already pushed and reports `chargeCapReached` in the summary. Leave empty to run without a cap."
          },
          "requestDelaySecs": {
            "title": "Delay between requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Pause between requests, in seconds. A cookie jar survives about three keyword page calls before 1688 answers with a validation page, and the actor rotates the jar on every query variant, so a short pause is enough. Raising the delay is the cheapest way to stretch a run when 1688 answers with a validation page.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout of one request in seconds. Keyword pages come back around 185 KB and detail pages around 190 KB over a Chinese residential proxy, where two to three seconds is normal and ten seconds is not.",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy the run goes through. The default is a Chinese residential pool, preconfigured so a run needs no setup. Keyword search only answers from a Chinese residential address: a US residential pool returned nothing in ten attempts. Proxy traffic is billed to your Apify account, and a 100 record run spends roughly 4 MB."
          },
          "runBudgetSecs": {
            "title": "Run budget",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Soft time budget for the whole run, in seconds. The run stops requesting before the platform timeout, keeps the rows it already pushed and reports the budget as exhausted in the summary. Leave empty to use the whole platform allowance."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}