{
  "openapi": "3.0.1",
  "info": {
    "title": "Temu Scraper - Products, Prices and Variants",
    "description": "Collect Temu product IDs, prices, images and sales signals from regional storefronts, including the US, UK, Germany and the Philippines. Search by keyword, category or product link. Pay per delivered row plus a start fee.",
    "version": "0.1",
    "x-build-id": "MRhlAgIo2SwGocScd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~temu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-temu-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/lentic_clockss~temu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-temu-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/lentic_clockss~temu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-temu-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "homeDiscover",
              "keywordSearch",
              "channelSearch",
              "categorySearch",
              "productDetail",
              "regions",
              "seoPdp",
              "serpDiscover",
              "seoSearch"
            ],
            "type": "string",
            "description": "Auto selects a mode from the product, category or keyword target you enter. Choose channelSearch, homeDiscover or regions explicitly; without a target, the current example run is capped at one row.",
            "default": "auto"
          },
          "productUrl": {
            "title": "Product URL",
            "pattern": "^(https?://)?([a-z0-9-]+\\.)*temu\\.com(/.*)?$",
            "type": "string",
            "description": "A Temu product link containing goods_id= or -g-<ID>.html. Clear the sample link when searching by keyword or category."
          },
          "goodsIds": {
            "title": "Goods IDs (batch)",
            "type": "array",
            "description": "Product IDs to collect with seoPdp, or seed product IDs for serpDiscover. Each ID has its own maxResults allowance.",
            "items": {
              "type": "string"
            }
          },
          "goodsId": {
            "title": "Goods ID",
            "pattern": "^\\s*\\d{6,20}\\s*$",
            "type": "string",
            "description": "The numeric product ID from a Temu product link, such as 601102486859949."
          },
          "keywords": {
            "title": "Keywords (batch)",
            "type": "array",
            "description": "Search phrases to collect in the selected search mode. maxResults applies separately to each phrase.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "One search phrase for keywordSearch, serpDiscover or seoSearch."
          },
          "keyword": {
            "title": "Keyword (alias)",
            "type": "string",
            "description": "Alternative field name for query."
          },
          "categoryUrl": {
            "title": "Category URL",
            "pattern": "^(https?://)?([a-z0-9-]+\\.)*temu\\.com(/.*)?$",
            "type": "string",
            "description": "A full Temu category link containing -o3-<ID>.html."
          },
          "categorySlug": {
            "title": "Category slug",
            "type": "string",
            "description": "The category name from its URL, such as cables-adapters. Use it with optId when you know both."
          },
          "optId": {
            "title": "Category ID",
            "type": "string",
            "description": "Category identifier from its Temu URL, such as 2643 for cables-adapters."
          },
          "catId": {
            "title": "Category ID (alternative field)",
            "type": "string",
            "description": "Alternative field name for optId."
          },
          "bucket": {
            "title": "Catalog group",
            "type": "string",
            "description": "Catalog group for selecting a category or filtering category metadata in regions mode."
          },
          "region": {
            "title": "Region path code",
            "pattern": "^[a-zA-Z]{2,6}$",
            "type": "string",
            "description": "Temu region code, such as us, uk, de, fr, au or ph. The Actor uses us when no region is entered; availability can vary by mode."
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum rows per keyword, product ID or single target; product and variant rows share the allowance. Default 70, collected in parts of 70 for larger requests, subject to the spending limit and Free-plan limits of 200 rows per run and 10 runs; no-target example runs use a one-row cap.",
            "default": 70
          },
          "channel": {
            "title": "Channel slug",
            "enum": [
              "",
              "best-sellers",
              "full-star",
              "new-in",
              "lightning-deals",
              "clearance"
            ],
            "type": "string",
            "description": "Channel to collect in channelSearch mode. If omitted or invalid, the Actor uses best-sellers."
          },
          "sort": {
            "title": "Sort",
            "type": "string",
            "description": "Requested listing order: default, sales, new, price_asc, price_desc or rating. The source may not honor every sort option."
          },
          "minPrice": {
            "title": "Min price",
            "type": "number",
            "description": "Requested minimum listing price. Filtering depends on the source page."
          },
          "maxPrice": {
            "title": "Max price",
            "type": "number",
            "description": "Requested maximum listing price. Filtering depends on the source page."
          },
          "refine": {
            "title": "Additional filter",
            "type": "string",
            "description": "A known Temu filter string. Leave empty if you do not have one."
          },
          "currency": {
            "title": "Currency hint",
            "type": "string",
            "description": "Optional currency hint, such as USD, PHP or EUR. It does not convert prices or guarantee that the source uses this currency."
          },
          "browseCountry": {
            "title": "Country (alternative field)",
            "type": "string",
            "description": "Country selection used instead of region when supplied. For example, US selects us, GB selects uk, and PH selects ph."
          },
          "expandVariants": {
            "title": "Expand product variants",
            "type": "boolean",
            "description": "Return available SKU variants as separately billed rows after their parent product. Off by default; product and variant rows share maxResults.",
            "default": false
          },
          "enrichDetails": {
            "title": "Add product details",
            "type": "boolean",
            "description": "Add available product-page details to listing or discovery rows, up to enrichLimit. Off by default; missing details remain empty or absent.",
            "default": false
          },
          "enrichLimit": {
            "title": "Enrich limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of collected listings to enrich when enrichDetails is enabled.",
            "default": 3
          },
          "page": {
            "title": "Start page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Starting page for keyword, channel or category listings, counted from 1.",
            "default": 1
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of listing pages or home recommendation batches to request. The row allowance can stop collection earlier.",
            "default": 1
          },
          "cursor": {
            "title": "Continuation cursor",
            "type": "object",
            "description": "Continuation object returned as nextCursor in RUN_SUMMARY. Resubmit it unchanged with the same target to continue, including through variants."
          },
          "pageRetry": {
            "title": "Page retry",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Retry limit when a requested page is unavailable or empty. Retries do not guarantee results.",
            "default": 2
          },
          "seoFallback": {
            "title": "Allow alternative snapshots",
            "type": "boolean",
            "description": "Allow alternative product snapshots when a listing or product-page request fails. Such rows include degradedFrom and are not guaranteed current catalog data.",
            "default": true
          },
          "offlineCorpus": {
            "title": "Include archived product links",
            "type": "boolean",
            "description": "For serpDiscover, also look for product links in public web archives. Archived links may be stale; off by default.",
            "default": false
          },
          "browserCountryPin": {
            "title": "Developer test option",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          },
          "workerBaseUrl": {
            "title": "Developer test URL",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}