{
  "openapi": "3.0.1",
  "info": {
    "title": "Tokopedia Search, Category & Price Drop Scraper",
    "description": "Search Tokopedia by keyword, browse a category or top-sellers list, or look up specific product URLs, and get price, discount, rating, and seller details for each Indonesian marketplace listing.",
    "version": "1.1",
    "x-build-id": "0xhqWRRyaZ3YnEnaW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~tokopedia-search-category-and-price-drop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-tokopedia-search-category-and-price-drop-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/dataspryva~tokopedia-search-category-and-price-drop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-tokopedia-search-category-and-price-drop-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/dataspryva~tokopedia-search-category-and-price-drop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-tokopedia-search-category-and-price-drop-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",
            "type": "string",
            "description": "What to scrape."
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search (mode=search). Example: smartphone, sepatu lari, kopi arabika.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Search URLs (mode=search)",
            "type": "array",
            "description": "Tokopedia search or /find/ URLs. Filters and sort already in the URL are applied.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs (mode=categoryBrowse)",
            "type": "array",
            "description": "Tokopedia category URLs such as https://www.tokopedia.com/p/handphone-tablet/handphone.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs (mode=categoryBrowse)",
            "type": "array",
            "description": "Numeric Tokopedia category IDs, for example 24 for Handphone.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs (mode=productDetails)",
            "type": "array",
            "description": "Tokopedia product page URLs. Numeric IDs alone are not supported.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Result order.",
            "default": "relevance"
          },
          "priceMin": {
            "title": "Min price (IDR)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Minimum price in Indonesian Rupiah."
          },
          "priceMax": {
            "title": "Max price (IDR)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Maximum price in Indonesian Rupiah."
          },
          "condition": {
            "title": "Condition",
            "type": "string",
            "description": "Filter by product condition.",
            "default": "any"
          },
          "shopType": {
            "title": "Shop type",
            "type": "string",
            "description": "Filter by Tokopedia shop type.",
            "default": "any"
          },
          "minRating": {
            "title": "Minimum rating",
            "type": "string",
            "description": "Only show products rated 4 or higher.",
            "default": "any"
          },
          "city": {
            "title": "Seller location",
            "enum": [
              "any",
              "DKI Jakarta",
              "Jabodetabek",
              "Bandung",
              "Medan",
              "Surabaya",
              "Bali",
              "Banten",
              "D.I. Yogyakarta",
              "Semarang",
              "Makassar",
              "Palembang",
              "Denpasar",
              "Bekasi",
              "Tangerang",
              "Depok",
              "Bogor",
              "Jakarta Pusat",
              "Jakarta Selatan",
              "Jakarta Barat",
              "Jakarta Utara",
              "Jakarta Timur"
            ],
            "type": "string",
            "description": "Filter by a common seller location. Leave Any for all of Indonesia.",
            "default": "any"
          },
          "cityId": {
            "title": "City ID (advanced)",
            "type": "string",
            "description": "Exact Tokopedia city ID(s), comma-separated. Overrides the location dropdown."
          },
          "latestProductDays": {
            "title": "Listed within",
            "enum": [
              "any",
              "7",
              "14",
              "30",
              "90"
            ],
            "type": "string",
            "description": "Only show products added recently.",
            "default": "any"
          },
          "discountOnly": {
            "title": "Discounted products only",
            "type": "boolean",
            "description": "Only show products currently on discount.",
            "default": false
          },
          "codOnly": {
            "title": "Cash on delivery only",
            "type": "boolean",
            "description": "Only show products that offer cash on delivery.",
            "default": false
          },
          "freeShippingOnly": {
            "title": "Extra free shipping only",
            "type": "boolean",
            "description": "Only show products with the free-shipping offer.",
            "default": false
          },
          "preorder": {
            "title": "Availability",
            "type": "string",
            "description": "Filter by ready stock or preorder.",
            "default": "any"
          },
          "includeDetails": {
            "title": "Include product details",
            "type": "boolean",
            "description": "Add condition, stock, variants, description, and rating breakdown to search and category results. Slower and makes one extra request per product.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 6000,
            "type": "integer",
            "description": "Maximum number of products to return.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}