{
  "openapi": "3.0.1",
  "info": {
    "title": "Temu Products Scraper",
    "description": "Scrape Temu search results by keyword: price, original price, discount, units sold, rating, reviews, brand, seller, badges, delivery. Several keywords, sort and price filters. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "P7jRowIMrVSa5JT2P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~temu-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-temu-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/nice_dev~temu-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-temu-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/nice_dev~temu-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-temu-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": {
          "startUrls": {
            "title": "Start URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Temu search-result URLs (`https://www.temu.com/search_result.html?search_key=...`), filters set on the site included (`filter_items`); a country path (`https://www.temu.com/uk/search_result.html?search_key=phone%20case`) is accepted, the site served still follows the proxy's country. When this list is not empty, the keyword fields below are ignored; caps, filters and monitoring still apply. Max 1 000 URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "query": {
            "title": "Search keyword",
            "maxLength": 200,
            "type": "string",
            "description": "Free-text search, exactly as typed on Temu (e.g. `wireless earbuds`)."
          },
          "searchQueries": {
            "title": "More search keywords",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several keywords in one run (e.g. `desk lamp`, `led strip`): one search per keyword. Added to **Search keyword**; products found by several searches are saved once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max products",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of products to save for the whole run (after deduplication and filters). 0 = no limit.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max products per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for EACH search (keyword or search URL), so that the first search cannot use up the whole **Max products** budget. Temu shows about 180 to 360 products per search. 0 = no per-search cap.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "top_sales",
              "most_recent",
              "price_low_to_high",
              "price_high_to_low"
            ],
            "type": "string",
            "description": "Order of the search results, as on Temu.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only products at or above this price, in the currency of the Temu site served (EUR, GBP…). Applied by Temu's own price filter."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only products at or below this price, in the currency of the Temu site served."
          },
          "localWarehouseOnly": {
            "title": "Local warehouse only",
            "type": "boolean",
            "description": "Only products shipped from a local warehouse (Temu's 'Ships from: Local warehouse' filter), usually delivered faster.",
            "default": false
          },
          "categoryId": {
            "title": "Category ID",
            "pattern": "^[0-9]{1,12}$",
            "maxLength": 12,
            "type": "string",
            "description": "Only products of this Temu category (Temu's own category filter): the number in `filter_items=101:<id>` of a Temu search URL filtered by category, e.g. `355` (Headphones, Earbuds & Accessories), or the `rankingCategoryId` of a product (not its `categoryId`, a finer category). The ids are those Temu lists for the search."
          },
          "language": {
            "title": "Language",
            "enum": [
              "",
              "en",
              "de",
              "fr",
              "it",
              "es",
              "nl",
              "pl",
              "pt"
            ],
            "type": "string",
            "description": "Language of titles and labels, when the Temu site of the proxy's country offers it (otherwise Temu keeps its own). Empty = the site's default.",
            "default": ""
          },
          "minRating": {
            "title": "Min rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only products rated at least this (0 to 5, e.g. `4.5`). Products without a rating are dropped when this is set."
          },
          "minReviews": {
            "title": "Min reviews",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only products with at least this number of reviews."
          },
          "minSoldCount": {
            "title": "Min units sold",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only products with at least this number of units sold, as shown by Temu (`5K+ sold` counts as 5 000)."
          },
          "includeKeywords": {
            "title": "Include keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only the products whose title contains at least one of these words (e.g. `wireless`; case and accents ignored). Empty = no restriction. A product the filter drops is charged the filter fee like the other filters.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Drop the products whose title contains one of these words (e.g. `refurbished`; case and accents ignored).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeAds": {
            "title": "Exclude sponsored products",
            "type": "boolean",
            "description": "Drop the products marked 'AD' (sponsored) in the search results.",
            "default": false
          },
          "excludeAdultProducts": {
            "title": "Exclude adult products",
            "type": "boolean",
            "description": "Drop the products that Temu flags as adult / age-restricted.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new products",
            "type": "boolean",
            "description": "Skip the products that a previous run (same **Memory key**) already delivered: they are not saved and not charged. First run = everything is new.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new products**. Give each schedule / task its own key (e.g. `earbuds-monitor`) so that they do not share their memory. Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every product again. Untick it afterwards.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (included proxy: paying users only)",
            "type": "object",
            "description": "Apify Proxy or your own proxies. With any Apify Proxy setting (the default), Temu is read through a residential proxy the Actor provides, charged per result page (see Pricing); your own proxies in \"proxyUrls\" are not charged. The country of the proxy decides which Temu site (currency, prices) is served. The residential Apify proxy group is not available in this Actor. On the Apify free plan the included proxy is not available: add your own proxy URLs, or the run stops at once with a message.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Include debug messages in the run log, and keep a screenshot of each page Temu blocks (up to 10) in the key-value store, as DEBUG_… records.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}