Tokopedia API endpoint
Returns current public Tokopedia search suggestions for a partial keyword. Suggestions include canonical product-search URLs and are not product-search results.
/tokopedia/autocompleteQuery parameters:
q (required): partial product keyword, up to 100 characters.Returns current public search suggestions and canonical product-search URLs. This
is a typeahead endpoint, not a product search; browser_rendered is always
false.
| Field | Filled in, of 9 checked | Values in the sample |
|---|---|---|
| text | 9 | “sepatu pria” and 8 other values |
| url | 9 | tokopedia.com |
| is_ad | 9 | true in 0 of 9 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Partial product keyword, up to 100 characters | iph | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/tokopedia/autocomplete?q=iph" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "iph",
"browser_rendered": false,
"suggestions": [
{
"text": "iphone 15",
"url": "https://www.tokopedia.com/search?q=iphone+15&st=product",
"is_ad": false
}
]
}
}Request schema
No body schema
Response schema
#/definitions/tokopedia.autocompleteResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | tokopedia.AutocompleteResponse | No | ||||
| data.browser_rendered | boolean | No | ||||
| data.fetched_at | string | No | ||||
| data.query | string | No | ||||
| data.suggestions | array | No | ||||
| data.suggestions[].is_ad | boolean | No | ||||
| data.suggestions[].text | string | No | ||||
| data.suggestions[].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/autocomplete?q=iph" \
-H "x-api-key: $CRAWLORA_API_KEY"