{
  "openapi": "3.0.1",
  "info": {
    "title": "Tokopedia Product Scraper",
    "description": "Scrape Tokopedia — Indonesia's #1 marketplace — for prices (IDR), ratings, per-star reviews, sold counts, full specs, variants & child SKUs, images & seller data. Keyword, URL or category search; fast overview or full detail. Clean JSON/CSV/Excel, no code, no API key.",
    "version": "1.0",
    "x-build-id": "jde7wSA8WLIrZmZ2X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~tokopedia-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-tokopedia-product-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/sian.agency~tokopedia-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-tokopedia-product-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/sian.agency~tokopedia-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-tokopedia-product-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": {
          "keywords": {
            "title": "🔍 Search Keywords",
            "type": "array",
            "description": "🔍 **KEYWORD SEARCH:** Free-text Tokopedia searches — exactly what you'd type into the site's search bar (Indonesian terms work best).\n\n📝 **EXAMPLES:** `sepatu` · `iphone 15` · `tas wanita` · `laptop gaming` · `skincare`\n\n💡 **TIP:** Add one keyword per line — each runs as its own search and all results land in the same dataset.\n\n🖊️ **BULK EDIT:** Click \"Bulk edit\" to paste many keywords at once (one per line).\n\n✅ **IMPORTANT:** Provide either keywords OR Tokopedia search URLs (at least one is needed to have something to scrape).",
            "default": [
              "sepatu"
            ],
            "items": {
              "type": "string"
            }
          },
          "scrapeMode": {
            "title": "⚙️ Scrape Mode",
            "enum": [
              "overview",
              "detail"
            ],
            "type": "string",
            "description": "⚙️ **SCRAPE DEPTH:** Choose how much data to pull per product.\n\n⚡ **Overview (fast):** Search results only — product id, title, price (current / original / discount %), rating, review & sold counts, image thumbnail, seller name & location, Official Store flag, badges/labels and product URL. Fastest and cheapest path.\n\n🔬 **Detail (full enrichment):** Everything in Overview PLUS the full specifications table, colour/size variants with child SKUs, per-star rating breakdown, rich product description, category breadcrumbs, condition, stock, weight, minimum order and seller store info.\n\n💡 **TIP:** Start with Overview to scope the catalog, then switch to Detail when you need the complete spec sheet for feeds or comparisons.",
            "default": "overview"
          },
          "sort": {
            "title": "🔃 Sort Order",
            "enum": [
              "relevance",
              "newest",
              "best_selling",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "🔃 **RESULT ORDERING:** Order search results using Tokopedia's own native sort keys — so you get the same ranking real shoppers see.\n\n🎯 **Relevance** is Tokopedia's default score · 🆕 **Newest** prioritizes the latest arrivals · 🏆 **Best selling** surfaces the most popular products first · 💲 **Price** sorts ascending or descending.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "🔢 Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 **RESULT CAP:** Maximum number of products to return across all keywords and URLs combined.\n\n🎁 **TIER-BASED LIMITS:**\n- **FREE users:** Up to 25 products per run\n- **PAID users:** Unlimited — scrape entire catalogs in a single run\n\n💡 **TIP:** Keep this low while you dial in your keywords, then raise it once the output looks right.",
            "default": 100
          },
          "minPrice": {
            "title": "💵 Min Price (IDR)",
            "minimum": 0,
            "type": "integer",
            "description": "💵 **MINIMUM PRICE:** Only return products at or above this price, in Indonesian Rupiah (IDR / Rp). Leave blank for no lower bound."
          },
          "maxPrice": {
            "title": "💰 Max Price (IDR)",
            "minimum": 0,
            "type": "integer",
            "description": "💰 **MAXIMUM PRICE:** Only return products at or below this price, in Indonesian Rupiah (IDR / Rp). Leave blank for no upper bound."
          },
          "minRating": {
            "title": "⭐ Minimum Rating",
            "enum": [
              "",
              "4.5",
              "4",
              "3"
            ],
            "type": "string",
            "description": "⭐ **MINIMUM RATING:** Only return products at or above this star rating. Choose `Any` to include every product regardless of rating.",
            "default": ""
          },
          "city": {
            "title": "🏙️ City ID (Advanced)",
            "type": "string",
            "description": "🏙️ **CITY FILTER (Advanced):** Restrict results to one or more Tokopedia cities, using Tokopedia's own city id(s).\n\n🔧 **HOW TO GET IT:** Open a Tokopedia search page, apply a city filter, and copy the numeric `fcity` value(s) from the URL.\n\n🖊️ **MULTIPLE CITIES:** Comma-separate ids, e.g. `174,175`.\n\n💡 **TIP:** Leave blank to include sellers nationwide."
          },
          "category": {
            "title": "🧭 Category ID (Advanced)",
            "type": "string",
            "description": "🧭 **CATEGORY BROWSING (Advanced):** Narrow results to a Tokopedia category using Tokopedia's own category id (`sc`).\n\n🔧 **HOW TO GET IT:** Open any Tokopedia category or search page and copy the numeric `sc` value from the URL.\n\n💡 **TIP:** Leave blank if you're only using keywords — this is purely an advanced filter."
          },
          "officialOnly": {
            "title": "🏬 Official Stores Only",
            "type": "boolean",
            "description": "🏬 **OFFICIAL STORE ONLY:** When enabled, return only products sold by Tokopedia **Official Store** sellers (verified brands and authorized retailers) — filtering out third-party merchants.\n\n💡 **TIP:** Leave off to include every seller.",
            "default": false
          },
          "urls": {
            "title": "🔗 Tokopedia Search URLs (Advanced)",
            "type": "array",
            "description": "🔗 **PASTE SEARCH-PAGE URLs:** Paste full tokopedia.com/search URLs to scrape them verbatim — the filters and sorting you already set in the URL are preserved.\n\n📝 **EXAMPLE:** `https://www.tokopedia.com/search?q=sepatu`\n\n🖊️ **BULK EDIT:** Add one URL per line to sweep several searches in a single run.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}