{
  "openapi": "3.0.1",
  "info": {
    "title": "Tokopedia Scraper - Product Search, Prices & Details",
    "description": "Scrape Tokopedia by keyword or product URL. Get product name, price in Rupiah, rating, store, seller location, image and link. Filter search results by seller city. Product pages add items sold, condition and description. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "BiausYesLKhDUOs8L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tictechid~vanzi-tokopedia/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tictechid-vanzi-tokopedia",
        "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/tictechid~vanzi-tokopedia/runs": {
      "post": {
        "operationId": "runs-sync-tictechid-vanzi-tokopedia",
        "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/tictechid~vanzi-tokopedia/run-sync": {
      "post": {
        "operationId": "run-sync-tictechid-vanzi-tokopedia",
        "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": {
          "search": {
            "title": "Search Query (Mode 1: Search Tokopedia)",
            "type": "string",
            "description": "Search for products on Tokopedia. When provided (and product_url is empty), scraper will search Tokopedia and return top results. Example: 'laptop gaming'"
          },
          "product_url": {
            "title": "Product URL (Mode 2: Individual Product)",
            "type": "string",
            "description": "Scrape detailed information from a single Tokopedia product page. Includes stock, variants, description, min order, condition, etalase, and more."
          },
          "limit": {
            "title": "Maximum Products to Scrape",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of products to scrape. Set to 0 for unlimited scraping. Only applies to search mode.",
            "default": 50
          },
          "sort_order": {
            "title": "Sort Order",
            "enum": [
              "",
              "paling_sesuai",
              "ulasan",
              "terbaru",
              "harga_tertinggi",
              "harga_terendah"
            ],
            "type": "string",
            "description": "Sort search results. Options: 'paling_sesuai' (most relevant), 'ulasan' (reviews), 'terbaru' (newest), 'harga_tertinggi' (highest price), 'harga_terendah' (lowest price). Leave empty for default sorting.",
            "default": ""
          },
          "location": {
            "title": "Location Filter",
            "enum": [
              "",
              "dki_jakarta",
              "jabodetabek",
              "bandung",
              "medan",
              "surabaya",
              "semarang",
              "yogyakarta",
              "makassar",
              "bali",
              "aceh",
              "banten",
              "bengkulu",
              "papua",
              "ambon",
              "balikpapan",
              "bandar_lampung",
              "banjar",
              "banjarbaru",
              "banjarmasin",
              "batam",
              "batu",
              "bekasi",
              "bima",
              "binjai",
              "bitung",
              "blitar",
              "bogor",
              "cilegon",
              "cimahi",
              "cirebon",
              "depok",
              "padang",
              "palangka_raya"
            ],
            "type": "string",
            "description": "Filter search results by seller location. We can add more specific locations based on request. Contact us if you need a specific city or region not listed.",
            "default": ""
          },
          "price_min": {
            "title": "Minimum Price (Rp)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter products with minimum price. Enter price in Indonesian Rupiah (without 'Rp' or commas). Example: 100000 for Rp100,000."
          },
          "price_max": {
            "title": "Maximum Price (Rp)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter products with maximum price. Enter price in Indonesian Rupiah (without 'Rp' or commas). Example: 5000000 for Rp5,000,000."
          },
          "condition": {
            "title": "Product Condition",
            "enum": [
              "",
              "baru",
              "bekas"
            ],
            "type": "string",
            "description": "Filter by product condition. Options: 'baru' (new), 'bekas' (used), or leave empty for all conditions.",
            "default": ""
          },
          "shipping_duration": {
            "title": "Shipping Duration",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by shipping duration options. Select one or more options.",
            "items": {
              "type": "string",
              "enum": [
                "instant",
                "same_day"
              ]
            }
          },
          "recently_added_days": {
            "title": "Recently Added (Days)",
            "enum": [
              "",
              "7",
              "14",
              "30",
              "90"
            ],
            "type": "string",
            "description": "Filter products by how recently they were added. Options: 7 days, 14 days, 30 days (1 month), 90 days (3 months).",
            "default": ""
          },
          "shop_tier": {
            "title": "Shop Type",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by shop type/tier. Select one or more options.",
            "items": {
              "type": "string",
              "enum": [
                "mall",
                "power_merchant"
              ]
            }
          },
          "rating_minimum": {
            "title": "Minimum Rating",
            "enum": [
              "",
              "4"
            ],
            "type": "string",
            "description": "Filter products with minimum rating. Currently only '4+' (4 stars and above) is supported by Tokopedia.",
            "default": ""
          },
          "offers": {
            "title": "Special Offers",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by special offers. Select one or more options.",
            "items": {
              "type": "string",
              "enum": [
                "cod",
                "discount"
              ]
            }
          },
          "stock_status": {
            "title": "Stock Status",
            "enum": [
              "",
              "preorder",
              "ready_stock"
            ],
            "type": "string",
            "description": "Filter by stock availability.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}