> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopping

> Compare prices and sellers on Google Shopping, search Amazon products and best sellers, and search TikTok Shop products, sellers and reviews.

Compare prices and sellers on Google Shopping, search Amazon products and best sellers, and search TikTok Shop products, sellers and reviews. See every field in the [Shopping reference](/api-reference/endpoint/amazon-search), or try it in the [playground](https://stophy.dev/playground).

## Search Amazon products

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.amazon.search({ query: "wireless earbuds" });
  console.log(result.data.results);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.amazon.search(query="wireless earbuds")
  print(result["data"]["results"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/amazon/search \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"query":"wireless earbuds"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy amazon search "wireless earbuds"
  ```
</CodeGroup>

The response:

```json theme={null}
{
  "success": true,
  "data": {
    "total": 1234,
    "results": [
      {
        "productId": "abc123",
        "productUrl": "https://example.com/",
        "title": "Example title",
        "imageUrl": "https://example.com/image.jpg",
        "price": 19.99,
        "originalPrice": 19.99,
        "priceCurrency": "example",
        "rating": 4.5,
        "reviews": 1234,
        "boughtPastMonth": 1,
        "isSponsored": false
      }
    ],
    "page": 1
  },
  "creditsUsed": 2,
  "requestId": "ee81c546-e935-44c1-8876-409b6f8dc407"
}
```

## Endpoints

| Endpoint | Cost |
| - | - |
| [Compare product prices and sellers on Google Shopping by country](/api-reference/endpoint/google-shopping) | 2 credits |
| [Search Amazon products](/api-reference/endpoint/amazon-search) | 2 credits |
| [Get a product's price, details and rating](/api-reference/endpoint/amazon-product) | 2 credits |
| [Get the best sellers in a category](/api-reference/endpoint/amazon-bestsellers) | 2 credits |
| [Get Amazon search suggestions for a keyword](/api-reference/endpoint/amazon-suggest) | 1 credit |
| [Search Shop products by keyword, with price and sales](/api-reference/endpoint/tiktok-shop-search) | 1 credit |
| [A seller's products, name, rating and sales](/api-reference/endpoint/tiktok-shop-products) | 1 credit |
| [A product's price, stock, seller, images and videos](/api-reference/endpoint/tiktok-shop-product) | 1 credit |
| [The first page of a product's reviews](/api-reference/endpoint/tiktok-shop-reviews) | 1 credit |

## More ways to call it

### Get a product's price, details and rating

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.amazon.product({ productUrl: "https://www.amazon.com/dp/B0CX23V2ZK" });
  console.log(result.data);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.amazon.product(product_url="https://www.amazon.com/dp/B0CX23V2ZK")
  print(result["data"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/amazon/product \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"productUrl":"https://www.amazon.com/dp/B0CX23V2ZK"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy amazon product --productUrl https://www.amazon.com/dp/B0CX23V2ZK
  ```
</CodeGroup>

### Compare product prices and sellers on Google Shopping by country

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.google.shopping({ query: "running shoes" });
  console.log(result.data.results);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.google.shopping(query="running shoes")
  print(result["data"]["results"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/google/shopping \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"query":"running shoes"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy google shopping "running shoes"
  ```
</CodeGroup>

<Tip>Amazon search, product and best sellers, and Google Shopping cost 2 credits. Pass the product link from an Amazon search result into `amazon.product`.</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.