Tokopedia API endpoint
Returns public Tokopedia product cards for a keyword from Tokopedia's public product-search operation. `sort` accepts `3` (lowest price), `4` (highest price), `5` (most reviewed), `9` (newest), or `23` (most relevant). Repeat `filter` as `key:value` using values from `/tokopedia/search/filters`.
/tokopedia/searchQuery parameters:
q (required): product keyword.page (optional): page 1 through 5; default 1.sort (optional): 3 lowest price, 4 highest price, 5 most reviewed, 9 newest, or 23 most relevant; default 23.filter (optional, repeatable): a live key:value selection from GET /tokopedia/search/filters?q=...; unsupported selections return 400. Example: filter=shop_tier:2&filter=condition:1.Results contain the public product-card identity, URL, image, price, rating,
and shop summary. browser_rendered is always false for this endpoint.
| Field | Filled in, of 60 checked | Values in the sample |
|---|---|---|
| name | 60 | “SALOMON SPEEDCROSS 3 HOLIDAY Unisex Sportstyle Running Shoe…” and 58 other values |
| url | 60 | tokopedia.com |
| image_url | 60 | p16-images-sign-sg.tokopedia-static.net and 3 other hosts |
| price | 60 | 80,000 to 3,399,000, median 391,200 |
| price_text | 60 | “Rp3.399.000” and 53 other values |
| rating | 60 | 5 |
| shop_name | 60 | “SALOMON Indonesia” and 27 other values |
| shop_city | 60 | “Jakarta Utara” and 9 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Product keyword | sepatu lari | |
| page | integer | No | Search page from 1 through 5 | ||
| sort | integer | No | Sort: 3 lowest price, 4 highest price, 5 most reviewed, 9 newest, 23 most relevant Allowed values: 3, 4, 5, 9, 23. | ||
| filter | array<string> | No | Repeat live key:value filter selections from /tokopedia/search/filters Repeat this query parameter for multiple values. | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/tokopedia/search?q=sepatu+lari&page=1&sort=3" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "sepatu lari",
"page": 1,
"sort": 23,
"browser_rendered": false,
"products": [
{
"name": "Sepatu Lari",
"price": 1250000,
"price_text": "Rp1.250.000",
"shop_name": "Nike Store"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/tokopedia.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | tokopedia.SearchResponse | No | ||||
| data.browser_rendered | boolean | No | ||||
| data.fetched_at | string | No | ||||
| data.page | integer | No | ||||
| data.products | array | No | Product record, 8 fields: image_url, name, price, price_text, rating, shop_city, shop_name, url. Described under Tokopedia home recommendations API. | |||
| data.query | string | No | ||||
| data.sort | integer | No | ||||
| data.source_url | string | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/tokopedia/search?q=sepatu+lari&page=1&sort=3" \
-H "x-api-key: $CRAWLORA_API_KEY"