# Taobao Search API Documentation

<p>Search the public logged-out Taobao catalogue. Each result carries the item id string for the item endpoint, the numeric shop id for the shop endpoint, a CNY price with original price and discount label, shop and seller, ships-from location, category path, full-size images and tags. The public page serves one result page only: page values above 1 are rejected. Price filters are applied to the returned rows and sort can reorder them by price. Autocomplete keywords are a separate endpoint, not product ids. Failed requests are never charged.</p>

- **Documentation:** [https://scrappa.co/docs/taobao-api/taobao_search](https://scrappa.co/docs/taobao-api/taobao_search)
- **API group:** Taobao API
- **Endpoint:** `GET https://scrappa.co/api/taobao/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 | Yes | Search words, e.g. phone. |
| `page` | integer | No | Only page 1 is available; higher values are rejected. |
| `sort` | string | No | default, price_asc or price_desc; applied to the returned page. |
| `min_price` | number | No | Lowest CNY price kept from the returned page. |
| `max_price` | number | No | Highest CNY price kept from the returned page. |
| `site` | string | No | Storefront: world, sg, my, th, jp or ca. |

## Example response

```json
{
    "data": {
        "page": 1,
        "count": 1,
        "query": "phone",
        "results": [
            {
                "shop": {
                    "id": "107922698",
                    "name": "Example shop"
                },
                "price": {
                    "amount": 1999,
                    "currency": "CNY",
                    "original": 2499,
                    "discount_label": "20% off"
                },
                "title": "Example phone",
                "images": [
                    "https://img.alicdn.com/example.jpg"
                ],
                "is_tmall": false,
                "item_id_str": "NnA1ek1CdXZMRTBpaEE4WUpxeUtnQT09"
            }
        ],
        "has_more": false
    },
    "meta": {
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is invalid. Not billable. |
| 503 | Service Unavailable | The catalogue is temporarily unavailable. Not billable. |

## 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)
