{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & 1688 Scraper: Product Prices, Sales & Agent Links",
    "description": "Taobao products and 1688 products by English or Chinese keyword: CNY price, images, monthly sales, bilingual title and shopping-agent link per product, with price filters. 在淘宝和1688搜索商品，比较人民币标价、月销量和商品图片。",
    "version": "0.1",
    "x-build-id": "xo7JBO0ydi9UcFIDY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~taobao-1688-agent-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-taobao-1688-agent-search",
        "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/automatic~taobao-1688-agent-search/runs": {
      "post": {
        "operationId": "runs-sync-automatic-taobao-1688-agent-search",
        "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/automatic~taobao-1688-agent-search/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-taobao-1688-agent-search",
        "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": "Search keywords",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Enter English or Chinese product names. Try wireless mouse on both marketplaces, or search 1688 for 无线鼠标.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "default": [
              "wireless mouse"
            ]
          },
          "platform": {
            "title": "Marketplace",
            "enum": [
              "taobao",
              "1688",
              "both"
            ],
            "type": "string",
            "description": "Choose Taobao, 1688, or both marketplaces.",
            "default": "both"
          },
          "maxResults": {
            "title": "Results per keyword and marketplace",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum products per keyword on each marketplace. Set this to 5 for a quick shortlist of up to 10 products across both marketplaces.",
            "default": 20
          },
          "maxTotalResults": {
            "title": "Maximum unique products in the run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique products across all requested searches.",
            "default": 200
          },
          "minPriceCny": {
            "title": "Minimum CNY price",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Products with unavailable prices are excluded when a price filter is set."
          },
          "maxPriceCny": {
            "title": "Maximum CNY price",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Inclusive maximum displayed CNY asking price; products without prices are excluded."
          },
          "requireKeywordMatch": {
            "title": "Require literal keyword matches",
            "type": "boolean",
            "description": "Keep only products whose English or Chinese title contains every search word. This removes unrelated suggestions, but can also exclude relevant synonyms or differently translated titles.",
            "default": true
          },
          "generateAgentLinks": {
            "title": "Include shopping-agent link map",
            "type": "boolean",
            "description": "Includes the observed OOPBuy product link. Links to other agents are not invented.",
            "default": true
          },
          "maxPagesPerQuery": {
            "title": "Maximum pages per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "A query is one keyword and marketplace. Fewer products may match within this bound.",
            "default": 3
          },
          "maxRequests": {
            "title": "Maximum source requests including retries",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum source HTTP requests, including retries, across the run.",
            "default": 30
          },
          "maxRunSeconds": {
            "title": "Maximum collection time in seconds",
            "minimum": 5,
            "maximum": 240,
            "type": "integer",
            "description": "Maximum time spent collecting products, in seconds.",
            "default": 240
          },
          "sortBy": {
            "title": "Sort the collected shortlist",
            "enum": [
              "source",
              "priceAsc",
              "priceDesc",
              "monthlySalesDesc"
            ],
            "type": "string",
            "description": "Order the collected shortlist across marketplaces after existing result limits. Does not change which products are collected or request a marketplace-wide sort. Missing prices or exact sales sort last; ties keep source order.",
            "default": "source"
          },
          "excludeKeywords": {
            "title": "Exclude title terms",
            "maxItems": 30,
            "type": "array",
            "description": "Skip products if either title contains any term as a literal substring (Unicode-normalized and case-insensitive). Up to 30 terms. Empty list disables this filter; skipped products do not consume result quotas or product charges.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "default": []
          },
          "minMonthlySales": {
            "title": "Minimum exact monthly sales",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Keep only products with an exact monthlySales count at or above this value. Missing counts and approximate labels such as 100+ are excluded, even for a zero threshold. Omit to disable."
          },
          "requireEnglishTitle": {
            "title": "Require an available English title",
            "type": "boolean",
            "description": "Keep products with a populated titleEn supplied by the shopping agent. Does not request an additional translation or guarantee translation quality.",
            "default": false
          },
          "requireImage": {
            "title": "Require a primary image URL",
            "type": "boolean",
            "description": "Keep products with a valid HTTP(S) primary image URL. Does not download images or verify that image hosts remain reachable.",
            "default": false
          },
          "includeImageSearch": {
            "title": "Add a 1688 search-by-photo link and input",
            "type": "boolean",
            "description": "Add a link and ready-to-copy input for the separate 1688 Image Search Actor when a product has a photo URL. This search run does not start or pay for image searches.",
            "default": false
          },
          "excludeRecordKeys": {
            "title": "Skip previously seen product keys",
            "maxItems": 10000,
            "type": "array",
            "description": "Exact recordKey values from your previous exports, up to 10000. Skips these products before quotas and product billing. Empty list disables exclusions. Case-sensitive; no history is saved automatically. A skipped product is not checked for price changes.",
            "items": {
              "type": "string",
              "pattern": "^(taobao|1688):oopbuy:[A-Za-z0-9_-]{1,160}$",
              "minLength": 1,
              "maxLength": 173
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}