{
  "openapi": "3.0.1",
  "info": {
    "title": "Tokopedia Scraper [$1/1K💰] | Products | Prices | Reviews",
    "description": "Scrape Tokopedia product listings, prices, discounts, promotions, ratings, customer reviews and seller statistics through the public GraphQL the site itself uses — no browser, no login. Built for price monitoring, market research and e-commerce analytics in Indonesia. $1 per 1,000 products.",
    "version": "0.1",
    "x-build-id": "8txTECUgBafK7dvIj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~tokopedia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-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/ahmed_jasarevic~tokopedia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-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/ahmed_jasarevic~tokopedia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-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",
        "required": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search on Tokopedia, e.g. [\"laptop\", \"sepatu nike\"]. Each query is paginated separately.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs",
            "type": "array",
            "description": "Optional Tokopedia category IDs to browse instead of (or in addition to) keywords, e.g. [\"3964\"] for washing machines. Category IDs appear as `sc` in Tokopedia category URLs and `category.id` in results.",
            "items": {
              "type": "string"
            }
          },
          "searchTasks": {
            "title": "Advanced search tasks",
            "type": "array",
            "description": "Optional per-query overrides (query or categoryId, sorting, price range, extra Tokopedia filters). Overrides the simple fields above for that task.",
            "items": {
              "type": "object",
              "properties": {
                "query": {
                  "type": "string",
                  "title": "Keyword",
                  "description": "Search keyword for this task."
                },
                "categoryId": {
                  "type": "string",
                  "title": "Category ID",
                  "description": "Tokopedia category ID to browse."
                },
                "orderBy": {
                  "type": "integer",
                  "title": "Sort code",
                  "description": "Sort code: 23=relevance, 3=price low→high, 4=price high→low, 5=newest, 8=most sold."
                },
                "priceMin": {
                  "type": "integer",
                  "title": "Min price (IDR)",
                  "description": "Minimum price in IDR."
                },
                "priceMax": {
                  "type": "integer",
                  "title": "Max price (IDR)",
                  "description": "Maximum price in IDR."
                },
                "filters": {
                  "type": "object",
                  "title": "Extra filters",
                  "description": "Raw Tokopedia filter key/value pairs, e.g. {\"shop_tier\":\"2\"} (Official stores), {\"rt\":\"4,5\"} (rating 4+), {\"fcity\":\"165\"} (city)"
                }
              }
            }
          },
          "sortBy": {
            "title": "Sort order (simple queries)",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc",
              "newest",
              "most_sold"
            ],
            "type": "string",
            "description": "Sorting applied to keywords from Search queries.",
            "default": "relevance"
          },
          "priceMin": {
            "title": "Min price (IDR)",
            "type": "integer",
            "description": "Optional minimum price filter for simple keyword queries."
          },
          "priceMax": {
            "title": "Max price (IDR)",
            "type": "integer",
            "description": "Optional maximum price filter for simple keyword queries."
          },
          "maxItems": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of products to push to the dataset across all queries. Hard-capped at 5000.",
            "default": 100
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum result pages to request per query (60 products per page). Hard-capped at 50.",
            "default": 3
          },
          "rowsPerPage": {
            "title": "Products per page",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Products requested per API page (Tokopedia maximum is 60).",
            "default": 60
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Fetch the first page of customer reviews for a limited number of products (one extra API call per enriched product).",
            "default": true
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of reviews to attach to each enriched product.",
            "default": 5
          },
          "maxProductsToEnrichReviews": {
            "title": "Max products with reviews",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on how many products get review enrichment per run (each costs one extra request). Set 0 to disable review calls.",
            "default": 20
          },
          "includeSellerDetails": {
            "title": "Include seller details",
            "type": "boolean",
            "description": "Fetch seller statistics (tier, transactions, products sold, favorites, location) for unique shops. One extra API call per unique shop.",
            "default": true
          },
          "maxShopsToEnrich": {
            "title": "Max shops to enrich",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound on unique shops enriched per run.",
            "default": 10
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to be used by your crawler."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}