{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Scraper: Wholesale Prices, MOQ, Suppliers, Monitor",
    "description": "1688 scraper: wholesale offers from 1688.com by Chinese or English keyword or pasted search link. Price tiers with quantity breaks, MOQ, sales, repurchase rate, shipping hints, supplier service scores, shop. Price, MOQ, province and sort filters. Monitor new offers and price changes.",
    "version": "0.1",
    "x-build-id": "hIZIXgTxMGeLda9zs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~1688-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-1688-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/datahamster~1688-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-1688-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/datahamster~1688-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-1688-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search words, one per line, as you would type them on 1688.com. Chinese words (\"手机壳\", \"蓝牙耳机\") search the whole catalogue; English words (\"phone case\") are sent as typed and match offers whose titles contain them, which is a much smaller set. The actor does not translate.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "1688 search links",
            "type": "array",
            "description": "Links copied from a 1688 search page, e.g. \"https://s.1688.com/selloffer/offer_search.htm?keywords=%CA%D6%BB%FA%BF%C7&sortType=price\". The link keeps its own filters (price, province, sort and the rest); the filters below are added only where the link has none.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max offers per search",
            "minimum": 1,
            "maximum": 2100,
            "type": "integer",
            "description": "Offers to return per keyword or link. 1688 shows about 55 offers per page and at most 34 pages (about 2,000 offers) per search. In monitor mode this sets how many pages are read on every run (all of them: 1688 ranks by relevance).",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 34,
            "type": "integer",
            "description": "Upper bound on result pages read per search (each page is one request). It matters when the price or MOQ filters drop many offers.",
            "default": 10
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "priceAsc",
              "priceDesc",
              "sales"
            ],
            "type": "string",
            "description": "1688's own sort. Price order is checked on the first page and reported in RUN_SUMMARY.filtersIgnored if 1688 did not apply it.",
            "default": "relevance"
          },
          "priceMin": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Sent to 1688 (a search link's own priceStart wins) and checked again on every offer: offers whose card price is lower than either limit are dropped and not charged."
          },
          "priceMax": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Sent to 1688 (a search link's own priceEnd wins) and checked again on every offer."
          },
          "maxMoq": {
            "title": "Max MOQ",
            "minimum": 1,
            "type": "integer",
            "description": "Only offers whose minimum order quantity (the first price tier) is at most this. Applied by the actor: 1688's own MOQ filter works the other way round. Offers whose card shows no price tiers (a quarter to a half, depending on the search) have no known MOQ and are kept; RUN_SUMMARY.moqUnknownKept counts them."
          },
          "province": {
            "title": "Province",
            "type": "string",
            "description": "Supplier province, Chinese (广东, 浙江) or pinyin (Guangdong, Zhejiang). Applied by 1688; cards do not show the location, so it cannot be checked per offer. City filters are not offered: 1688 search ignores them."
          },
          "reportPriceChanges": {
            "title": "Monitor: price changes",
            "type": "boolean",
            "description": "Monitor mode: also return an offer you already got when its regular price (basePrice, not a promo price), its price tiers or its MOQ changed.",
            "default": true
          },
          "minPriceChangePercent": {
            "title": "Monitor: smallest price change (%)",
            "minimum": 0,
            "type": "number",
            "description": "Monitor mode: ignore price moves smaller than this percentage.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many offers in total (you pay only for returned offers).",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}