# Tiki Search API Documentation

<p><strong>Tiki Search API</strong> searches products on Tiki in Vietnam. Each card has the id, sku, name, brand, price, original price, list price, discount amount and rate, rating, review count, sold count, seller ids, full-size image and product url.</p><p>Filter by price range, brand id, rating, sort order and category id. Get category ids from the Categories API and brand ids from data.filters.brands of an earlier search. Every item in the answer follows the filters you send. Page N returns the real page N with 40 results per page, up to page 50.</p><p>Prices are numbers in VND. The id and seller product id feed the Product and Reviews APIs unchanged. Costs 1 credit per successful request. Empty results and failed requests are free.</p>

- **Documentation:** [https://scrappa.co/docs/tiki-api/tiki_search](https://scrappa.co/docs/tiki-api/tiki_search)
- **API group:** Tiki API
- **Endpoint:** `GET https://scrappa.co/api/tiki/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Search text, for example dien thoai. Required unless you send a category. |
| `category` | integer | No | Category id from the Categories API. Required unless you send a query. |
| `page` | integer | No | One-based page number, 1 to 50 (default 1). |
| `sort` | string | No | One of default, top_seller, newest, price_asc or price_desc. |
| `min_price` | number | No | Lowest price in VND. |
| `max_price` | number | No | Highest price in VND. |
| `brand` | integer | No | Brand id. |
| `rating` | integer | No | Minimum rating, 1 to 5. |

## Example response

```json
{
    "data": {
        "query": "dien thoai",
        "filters": {
            "sorts": [
                "default",
                "top_seller",
                "newest",
                "price,asc",
                "price,desc"
            ],
            "brands": [
                {
                    "id": "42",
                    "name": "Example"
                }
            ],
            "categories": [
                {
                    "id": "1789",
                    "name": "Dien thoai"
                }
            ]
        },
        "results": [
            {
                "id": "278628812",
                "sku": "SKU-123",
                "name": "Example phone",
                "price": 12500000,
                "brand_id": 42,
                "currency": "VND",
                "discount": 1500000,
                "url_path": "https://tiki.vn/example-p278628812.html",
                "seller_id": 1,
                "brand_name": "Example",
                "list_price": 15000000,
                "availability": true,
                "review_count": 213,
                "discount_rate": 10.7,
                "quantity_sold": 1200,
                "thumbnail_url": "https://salt.tikicdn.com/ts/product/example.jpg",
                "original_price": 14000000,
                "rating_average": 4.8,
                "seller_product_id": 278630772
            }
        ],
        "category": null,
        "currency": "VND",
        "pagination": {
            "page": 1,
            "has_next": true,
            "per_page": 40,
            "total_results": 5000
        }
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a value is invalid. This response is not billable. |
| 503 | Upstream Unavailable | Tiki could not be reached. This response is not billable. Retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
