{
  "openapi": "3.0.1",
  "info": {
    "title": "1688.com Products Scraper",
    "description": "Extract public 1688.com product results with bulk price tiers, supplier badges, specifications, and demand metrics.",
    "version": "1.0",
    "x-build-id": "vDI6U8AhshadPDdnc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codingfrontend~1688-com-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codingfrontend-1688-com-products-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/codingfrontend~1688-com-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-codingfrontend-1688-com-products-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/codingfrontend~1688-com-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-codingfrontend-1688-com-products-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": {
          "searchQuery": {
            "title": "Product keywords",
            "maxLength": 300,
            "type": "string",
            "description": "Chinese or English keywords used to build a public 1688 search URL when no source URL is supplied.",
            "default": "wireless earbuds"
          },
          "queries": {
            "title": "Keyword queries",
            "maxItems": 100,
            "type": "array",
            "description": "Optional list of independent keyword searches. Combined with searchQuery when it contains a value. Up to 100 entries of at most 300 characters each.",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "sourceUrls": {
            "title": "1688 search URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Public HTTPS 1688 search-result URLs. Duplicate URLs are removed.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum real product records saved to the dataset.",
            "default": 100
          },
          "startPage": {
            "title": "Starting page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "One-based page number used for page-number fallback.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum pages per source",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Bounded sequential page traversal per source.",
            "default": 1
          },
          "deduplicate": {
            "title": "Deduplicate products",
            "type": "boolean",
            "description": "Deduplicate canonical product URLs across pages and sources.",
            "default": true
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "relevance",
              "minPrice",
              "maxPrice",
              "title",
              "supplierName",
              "demandMetric"
            ],
            "type": "string",
            "description": "Sorting is applied after bounded collection; relevance keeps source order.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Keep products whose observed price range overlaps this lower bound."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Keep products whose observed price range overlaps this upper bound."
          },
          "minOrderQuantity": {
            "title": "Minimum MOQ",
            "minimum": 0,
            "type": "number",
            "description": "Keep products whose observed minimum order quantity is at least this value."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "type": "number",
            "description": "Keep products with an observed rating at or above this value."
          },
          "minSales": {
            "title": "Minimum visible demand",
            "minimum": 0,
            "type": "number",
            "description": "Keep products with an observed demand metric at or above this value."
          },
          "minSupplierYears": {
            "title": "Minimum supplier years",
            "minimum": 0,
            "type": "number",
            "description": "Keep suppliers with an observed operating-year value at or above this value."
          },
          "location": {
            "title": "Supplier location contains",
            "maxLength": 120,
            "type": "string",
            "description": "Case-insensitive substring filter on the observed supplier location."
          },
          "supplierType": {
            "title": "Supplier type",
            "maxLength": 80,
            "type": "string",
            "description": "Observed public supplier type, such as factory or trader."
          },
          "factoryOnly": {
            "title": "Factory suppliers only",
            "type": "boolean",
            "description": "Keep rows whose observed supplier type or factory flag identifies a factory.",
            "default": false
          },
          "crossBorderOnly": {
            "title": "Cross-border suppliers only",
            "type": "boolean",
            "description": "Keep rows with an observed cross-border signal.",
            "default": false
          },
          "dispatchWithin24h": {
            "title": "24-hour dispatch only",
            "type": "boolean",
            "description": "Keep rows with an observed 24-hour dispatch signal.",
            "default": false
          },
          "requiredBadges": {
            "title": "Required supplier badges",
            "maxItems": 50,
            "type": "array",
            "description": "Case-insensitive badge substrings that must all be observed on the supplier card.",
            "items": {
              "type": "string"
            }
          },
          "includeMedia": {
            "title": "Include product media",
            "type": "boolean",
            "description": "Return product-owned image URLs when available.",
            "default": true
          },
          "includeAttributes": {
            "title": "Include specifications and categories",
            "type": "boolean",
            "description": "Return public product specifications and category paths when available.",
            "default": true
          },
          "includeSupplierDetails": {
            "title": "Include supplier details",
            "type": "boolean",
            "description": "Return public supplier fields when available.",
            "default": true
          },
          "includeProductDetails": {
            "title": "Include product detail page data",
            "type": "boolean",
            "description": "Visit the public detail page for selected products and add available Schema.org Product and Offer fields. Detail requests are bounded by maxItems and can be disabled to use search-page data only.",
            "default": true
          },
          "requestTimeoutMs": {
            "title": "Request timeout (milliseconds)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Per-request HTTP timeout, bounded to 5–120 seconds.",
            "default": 30000
          },
          "requestDelayMs": {
            "title": "Request delay (milliseconds)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between sequential page requests and bounded retry backoff.",
            "default": 500
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum bounded retries for retryable network or source errors.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Source concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Maximum independent sources processed at once; pages within one source remain ordered.",
            "default": 1
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 100000,
            "maximum": 20000000,
            "type": "integer",
            "description": "Reject oversized HTML responses before parsing.",
            "default": 5000000
          },
          "userAgent": {
            "title": "User agent",
            "maxLength": 300,
            "type": "string",
            "description": "Honest browser-like user agent for public HTTP requests; no stealth or CAPTCHA bypass is performed.",
            "default": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for page and browser requests. The default uses Apify Residential Proxy in China. You can turn it off or choose another group or country. Residential traffic adds charges.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}