{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Scraper — Product & Supplier Search, MOQ & Landed Cost",
    "description": "Scrape any 1688 category from one English keyword: English titles, MOQ price ladders, landed cost, dropship scores, compliance hints. Or watch a shortlist of offers for price drops and stock changes — daily snapshots, alerts, weekly trend report. Failed runs are never charged.",
    "version": "0.1",
    "x-build-id": "2LbGElYOHlIY4FFyy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawleast~1688-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawleast-1688-product-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/crawleast~1688-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawleast-1688-product-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/crawleast~1688-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawleast-1688-product-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": {
          "keyword": {
            "title": "Search keyword (English)",
            "type": "string",
            "description": "One English search keyword, e.g. \"led strip lights\" or \"yoga mat\". It is sent to 1688.com as typed and 1688's own search matches it — no Chinese required; plain, common product names match best. Pet-supply keywords are additionally mapped to Chinese search terms."
          },
          "offerIds": {
            "title": "Direct offer IDs (optional)",
            "type": "array",
            "description": "Direct-fetch these offer IDs (strings or numbers), bypassing keyword search. A detail request below 20 items automatically switches to card-only before browser/proxy work. Price Monitoring is separate."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Number of products to deliver (1–200). Default 40. Large detail orders (>55) are automatically sharded across fresh identities. Static cross-field rule: when detail enrichment is requested below 20 items, the Actor automatically switches to card-only before starting any proxy or browser; SUMMARY.deliveryShape reports requested, effective, actual and reason. Apify input schemas cannot emit a dynamic cross-field warning, so this description is the warning.",
            "default": 40
          },
          "includeDetails": {
            "title": "Include full details & enrichment",
            "type": "boolean",
            "description": "ON (default): request the full detail layer — SKU price range, attributes, landed cost breakdown, suggested retail & margin estimate, dropship-ready score and compliance assessment. Static cross-field rule: maxItems below 20 is automatically downgraded to card-only before proxy/browser startup. OFF: request card-only directly. SUMMARY.deliveryShape always discloses requested/effective/actual/reason.",
            "default": true
          },
          "targetMarket": {
            "title": "Target market",
            "enum": [
              "US",
              "EU",
              "UK"
            ],
            "type": "string",
            "description": "Drives the landed-cost tariff model and the compliance rulebook (required certifications, risk level, notes).",
            "default": "US"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevant",
              "sales",
              "price"
            ],
            "type": "string",
            "description": "Order of the DELIVERED dataset: relevance (platform search order), sales volume (most sold first) or unit price (low to high). The Actor passes the sort to 1688's search layer AND re-sorts the full delivery set before pushing, so the dataset always arrives in the promised order.",
            "default": "relevant"
          },
          "priceMin": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum price in Chinese Yuan. Approximate filter ANCHORED to the card's min (bulk/MOQ) listing price: passed to 1688's search AND re-checked at delivery — cards whose min listing price falls below it are dropped (and never charged). Leave empty for no lower limit."
          },
          "priceMax": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum price in Chinese Yuan. Approximate filter ANCHORED to the card's min (bulk/MOQ) listing price: passed to 1688's search AND re-checked at delivery — cards whose min listing price exceeds it are dropped (and never charged). Note: a card's max (one-piece / top-of-ladder) price may still exceed this bound, since 1688 prices by quantity breaks. Leave empty for no upper limit."
          },
          "maxTotalChargeUsd": {
            "title": "Billing cap (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Hard ceiling for this run's event charges. Results are capped before expensive work, charged before push, and only the rows confirmed by Actor.charge are delivered. 0 means no paid result work. SUMMARY.billingPlan and SUMMARY.billing expose the plan and factual charged counts. Leave empty to use only the platform cap."
          },
          "watchlistOfferIds": {
            "title": "Price-monitor watchlist (offer IDs)",
            "maxItems": 200,
            "type": "array",
            "description": "Up to 200 1688 offer IDs to watch (the numeric ID in a product URL, e.g. 994632611553). IDs beyond 200 are tail-truncated and never billed; invalid IDs are reported per-item and never billed.",
            "items": {
              "type": "string"
            }
          },
          "historyDays": {
            "title": "History window (days)",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "How many days of snapshots the curve aggregates over (min / max / 7-day-low and the change metrics). Default 30.",
            "default": 30
          },
          "alertOnPriceDropPct": {
            "title": "Alert on price drop at least (%)",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Fire a priceDrop alert for an offer when its price fell by at least this percent versus the previous snapshot. Alerts are free (never billed). Leave empty to disable."
          },
          "alertOnStockTightPct": {
            "title": "Alert on stock tightening at least (%)",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Fire a stockTight alert for an offer when its bookable amount shrank by at least this percent versus the previous snapshot. Alerts are free (never billed). Leave empty to disable."
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. When set and at least one alert fires, the run POSTs a JSON alert payload here. Time-bounded and non-fatal — a failing webhook is logged and never fails the run."
          },
          "includeTrendReport": {
            "title": "Include weekly trend report",
            "type": "boolean",
            "description": "Optional. Also deliver a trendReport row aggregating the biggest price drops and stock-tightening offers across the watchlist. Billed at $0.25 per report (only when the history store was reachable). Default off.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration used for all 1688 traffic.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "proxyCountry": "CN"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}