# Product search API

> 2 endpoints on 2 platforms return product search results as the same Product object. Products in a platform’s shop that match a keyword, a page at a time: title, current and original price, image,…

Canonical page: https://okdata.online/roles/products-search/

2 endpoints on 2 platforms return product search results as the same Product object. Products in a platform’s shop that match a keyword, a page at a time: title, current and original price, image, shop and, where the shop shows them, units sold and rating. A call costs from $0.004 to $0.02, each endpoint at its own price; a failed call is free.

## on each platform

| Platform | Endpoint | Path | A page | Price |
|---|---|---|---|---|
| TikTok | [TikTok Shop product search](https://okdata.online/apis/tiktok/shop/products/search/) | `GET /v1/tiktok/shop/products/search` | 20 | $0.004 per call · about 20 products per page |
| Xiaohongshu (RedNote) | [Xiaohongshu shop product search](https://okdata.online/apis/xiaohongshu/shop/products/search/) | `GET /v1/xiaohongshu/shop/products/search` | 20 | $0.02 per call · about 20 products per page |

## The object it returns: [Product](https://okdata.online/docs/objects/product/)

Every endpoint above returns these fields with the same names and types. A field a platform does not show comes back null and is named in meta.unavailable.

| Field | Type | Meaning |
|---|---|---|
| `id` | `string` | Product ID in the shop. |
| `url` | `string` | Product page. |
| `title` | `string` | Product title. |
| `price` | `number \| null` | Current price (the lowest variant), in the currency given. |
| `original_price` | `number \| null` | List price before discount, where shown. |
| `currency` | `string \| null` | ISO 4217 currency code. |
| `sold` | `integer \| null` | Units sold, as the shop shows it. |
| `rating` | `number \| null` | Average stars, 0 to 5. |
| `reviews` | `integer \| null` | Number of reviews. |
| `images` | `string[] \| null` | Product image URLs. |
| `shop` | `ShopRef` | Who sells it. |
| `ext` | `object` | Platform-specific extras. Only returned with view=full. |

## The same call on two platforms

Same parameters, same paging, same response shape. Only the path changes.

```bash
# TikTok
curl -G "https://api.okdata.online/v1/tiktok/shop/products/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=portable coffee maker'

# Xiaohongshu (RedNote)
curl -G "https://api.okdata.online/v1/xiaohongshu/shop/products/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=便携咖啡机'
```

## What people use it for

- See the price range of a product category before you set your own price.
- Find the best-selling listings for a keyword.
- Spot new competitors that appear in a search week by week.

## Questions

### Are sales numbers included?

Where the shop shows them. TikTok Shop does; Xiaohongshu’s shop does not show units sold as a number, so sold is null there.

### Which currency are prices in?

Each product carries a currency code. Xiaohongshu prices are in yuan; TikTok Shop prices are in the currency the shop shows.

### What do I do with a result?

Keep the product id. Pass it to product detail for all images and the shop, or to product reviews for what buyers say.

## Other data types

- [Comments API](https://okdata.online/roles/posts-comments-list/)
- [Trending topics API](https://okdata.online/roles/trends-list/)
- [Comment replies API](https://okdata.online/roles/comments-replies-list/)
- [Hashtag posts API](https://okdata.online/roles/topics-posts-list/)
- [Profile API](https://okdata.online/roles/accounts-get/)
- [Account posts API](https://okdata.online/roles/accounts-posts-list/)
- [Post detail API](https://okdata.online/roles/posts-get/)
- [Post search API](https://okdata.online/roles/posts-search/)
- [Trending posts API](https://okdata.online/roles/posts-trending/)
- [Account search API](https://okdata.online/roles/accounts-search/)
- [Post metrics API](https://okdata.online/roles/posts-metrics/)
- [Community posts API](https://okdata.online/roles/communities-posts-list/)
- [Ad detail API](https://okdata.online/roles/ads-get/)
- [Advertiser ads API](https://okdata.online/roles/advertisers-ads-list/)
- [Ad search API](https://okdata.online/roles/ads-search/)
- [Transcript API](https://okdata.online/roles/transcripts-get/)
- [Followers list API](https://okdata.online/roles/accounts-followers-list/)
- [Product detail API](https://okdata.online/roles/products-get/)
- [Product reviews API](https://okdata.online/roles/products-reviews-list/)
- [Creator search API](https://okdata.online/roles/creators-search/)
- [Creator profile API](https://okdata.online/roles/creators-get/)
- [Creator audience API](https://okdata.online/roles/creators-audience-get/)
