{
  "openapi": "3.0.1",
  "info": {
    "title": "Tokopedia Scraper: Products, Prices, Stock, Reviews and Shops",
    "description": "Scrape Tokopedia by keyword, category, shop or product link: price, original price, discount, rating, sold count, stock, shop city and Mall or Power Shop badge, images and category. Optional variants with price and stock, reviews and shop rows. No login.",
    "version": "0.1",
    "x-build-id": "TbX1cerI9YgYYGui6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~tokopedia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-tokopedia-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/themineworks~tokopedia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-tokopedia-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/themineworks~tokopedia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-tokopedia-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": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Search words, one per line, as you would type them in the Tokopedia search box. Indonesian words return the most products, for example sepatu lari, tas wanita, rice cooker. A Tokopedia search link (tokopedia.com/search?q=...) works here too and keeps its own filters. Each line is one search, up to maxItems products.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category links (optional)",
            "type": "array",
            "description": "Tokopedia category links such as https://www.tokopedia.com/p/olahraga/perlengkapan-lari/sepatu-lari-wanita, or a category id such as 3577. Each category returns up to maxItems products.",
            "items": {
              "type": "string"
            }
          },
          "shopUrls": {
            "title": "Shop links (optional)",
            "type": "array",
            "description": "Tokopedia shop links such as https://www.tokopedia.com/decathlon, or just the shop name from the link (decathlon). Each shop returns up to maxItems products from its catalogue, with your filters applied.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product links (optional)",
            "type": "array",
            "description": "Tokopedia product links such as https://www.tokopedia.com/tomkinsofficial/tomkins-primal-alpha-hitam-putih-sneakers-wanita-sepatu-olahraga. Each link returns one row with the full product page: every variant with its own price and stock, description, specifications and the star breakdown. Share links (tk.tokopedia.com) are followed once.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max products per input",
            "minimum": 1,
            "maximum": 6000,
            "type": "integer",
            "description": "The most products to return for each keyword, category or shop, 1 to 6,000. Tokopedia serves at most 6,000 results per search; split a bigger one with price ranges or locations. Product links are not counted here.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "reviews",
              "newest",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "The order of the results, as in the sort menu on Tokopedia. A search link that already carries a sort keeps its own.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price in IDR (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in rupiah, for example 100000. Tokopedia applies it, and the actor checks it again on every row."
          },
          "maxPrice": {
            "title": "Max price in IDR (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in rupiah, for example 300000."
          },
          "locations": {
            "title": "Shop locations (optional)",
            "type": "array",
            "description": "Only products from shops in these cities or provinces, as Tokopedia writes them in its Lokasi filter: DKI Jakarta, Jabodetabek, Bandung, Surabaya, Medan, Jawa Barat, Jawa Timur, Bali and so on. Tokopedia's numeric city ids (fcity) work too. A name Tokopedia does not know gets an error row and is left out.",
            "items": {
              "type": "string"
            }
          },
          "shopType": {
            "title": "Shop type",
            "enum": [
              "any",
              "official",
              "power_shop",
              "official_or_power_shop"
            ],
            "type": "string",
            "description": "Only products from Mall (official) stores, from Power Shops, or from either, as in Tokopedia's Jenis toko filter.",
            "default": "any"
          },
          "minRating": {
            "title": "Min rating (optional)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only products rated at least this many stars, 1 to 5, for example 4.5. From 4 up, Tokopedia's own 4 stars and up filter is used too. Products with no rating yet are left out when this is set."
          },
          "codOnly": {
            "title": "Cash on delivery only",
            "type": "boolean",
            "description": "Only products that can be paid on delivery (Bisa COD).",
            "default": false
          },
          "discountedOnly": {
            "title": "Discounted only",
            "type": "boolean",
            "description": "Only products on discount (Harga Diskon).",
            "default": false
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New, used or both.",
            "default": "any"
          },
          "includeDetails": {
            "title": "Add product page details (variants, description, exact sold count)",
            "type": "boolean",
            "description": "On: each product's page is read too (6 products a request): every variant with its own price and stock, total stock, description, specifications, brand, weight, condition, exact sold count, review count, star breakdown, all pictures, full category path and any flash sale. Each such row is charged as product-with-details instead of product-scraped. Off: rows come from the search results, which is faster.",
            "default": false
          },
          "includeReviews": {
            "title": "Include product reviews",
            "type": "boolean",
            "description": "On: the reviews of each delivered product come as extra rows with record_type review: stars, text, date, variant bought, likes, photos and the seller's reply. Each review is charged as a review-scraped event.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Reviews per product",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many reviews to deliver for each product, 1 to 2,000. Used only when Include product reviews is on.",
            "default": 20
          },
          "reviewSort": {
            "title": "Review order",
            "enum": [
              "newest",
              "most_helpful",
              "highest_rating",
              "lowest_rating"
            ],
            "type": "string",
            "description": "Used only when Include product reviews is on.",
            "default": "newest"
          },
          "reviewStars": {
            "title": "Review stars (optional)",
            "type": "array",
            "description": "Only reviews with these star ratings, for example 1 and 2 for complaints. Leave empty for all. Used only when Include product reviews is on.",
            "items": {
              "type": "string"
            }
          },
          "includeShops": {
            "title": "Include shop rows",
            "type": "boolean",
            "description": "On: one extra row (record_type shop) for each shop behind the delivered products and each shop link: city, Mall or Power Shop badge, followers, active products, items sold, transactions, open since, shop rating and star breakdown. Each shop row is charged as a shop-scraped event.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the actor uses Apify's datacenter proxy, which Tokopedia answered every time in our tests, moves to a new IP when one is refused, and moves to Indonesian residential IPs only if two datacenter sessions in a row are refused. Choose a group or country here only if you want that one pool.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}