{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinduoduo (拼多多) product feed",
    "description": "Collect structured Pinduoduo product cards from the public anonymous recommendation feed: id, title, URL, images, price fields, discount percent, demand signals, and a target-price verdict (BUY_SIGNAL / WATCH / MONITOR).",
    "version": "0.1",
    "x-build-id": "Gex0Dssxmtg3ucmaU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_dino~pinduoduo-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_dino-pinduoduo-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/data_dino~pinduoduo-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-data_dino-pinduoduo-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/data_dino~pinduoduo-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-data_dino-pinduoduo-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",
        "required": [
          "maxItems"
        ],
        "properties": {
          "maxItems": {
            "title": "Max products",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many product rows. Note: the feed is a per-exit permutation of a ~90-110 product catalogue, so the walk may exhaust below this number; it stops when consecutive passes add no new products.",
            "default": 10
          },
          "targetPriceCny": {
            "title": "Target price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Procurement target price. Items at or below this get a BUY_SIGNAL verdict; within +15% (or showing a price drop) get WATCH; otherwise MONITOR."
          },
          "keywordContains": {
            "title": "Keyword filter (title)",
            "type": "string",
            "description": "Only keep products whose title contains this text (e.g. 耳机). Applied locally after the crawl — the feed has no server-side search."
          },
          "minPriceCny": {
            "title": "Minimum price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep products priced at or above this amount."
          },
          "maxPriceCny": {
            "title": "Maximum price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep products priced at or below this amount."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "feed",
              "price",
              "price-desc",
              "discount",
              "demand",
              "price-delta"
            ],
            "type": "string",
            "description": "Row order: feed (as served), price ascending/descending, biggest discount first, demand (sales), or price delta (biggest drop).",
            "default": "feed"
          },
          "source": {
            "title": "Data source",
            "enum": [
              "api",
              "ssr",
              "auto"
            ],
            "type": "string",
            "description": "api = recommendation feed API (default); ssr = home-page HTML only; auto = api then ssr fallback.",
            "default": "api"
          },
          "useProxy": {
            "title": "Use managed residential proxy",
            "type": "boolean",
            "description": "Route through the bundled rotating residential proxy for deeper catalogue coverage. Disable for fewer products but no proxy dependency.",
            "default": true
          },
          "delay": {
            "title": "Delay between requests (s)",
            "minimum": 0,
            "type": "number",
            "description": "Seconds between feed requests.",
            "default": 0.4
          },
          "listId": {
            "title": "Feed list id (optional)",
            "type": "string",
            "description": "Pin the feed permutation seed. Leave blank to use a random seed per pass."
          },
          "startOffset": {
            "title": "Start offset",
            "minimum": 0,
            "type": "integer",
            "description": "Start position within the feed.",
            "default": 0
          },
          "staleLimit": {
            "title": "Stale pass limit",
            "minimum": 1,
            "type": "integer",
            "description": "Consecutive passes that add fewer than 2 new products end the walk.",
            "default": 3
          },
          "maxSeconds": {
            "title": "Max run time (s)",
            "minimum": 1,
            "type": "integer",
            "description": "Wall-clock budget for the whole run.",
            "default": 240
          },
          "previousSnapshot": {
            "title": "Previous snapshot (price tracking)",
            "type": "array",
            "description": "Optional array of prior result rows to diff prices against (priceDelta / WATCH on drops). Leave empty for a first run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}