> ## 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. Search eBay and Facebook Marketplace, and read Trustpilot reviews.

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

## Scrape Amazon search results

<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": "e3c32e52-81d2-4fba-856c-1923affda334"
}
```

## Endpoints

| Endpoint | Cost |
| - | - |
| [Scrape Google Shopping results](/api-reference/endpoint/google-shopping) | 2 credits |
| [Scrape Amazon search results](/api-reference/endpoint/amazon-search) | 2 credits |
| [Scrape an Amazon product page](/api-reference/endpoint/amazon-product) | 2 credits |
| [Scrape Amazon Best Sellers lists](/api-reference/endpoint/amazon-bestsellers) | 2 credits |
| [Scrape Amazon search suggestions](/api-reference/endpoint/amazon-suggest) | 1 credit |
| [Scrape TikTok Shop search results](/api-reference/endpoint/tiktok-shop-search) | 1 credit |
| [Scrape a TikTok Shop seller's products](/api-reference/endpoint/tiktok-shop-products) | 1 credit |
| [Scrape a TikTok Shop product page](/api-reference/endpoint/tiktok-shop-product) | 1 credit |
| [Scrape a TikTok Shop product's reviews](/api-reference/endpoint/tiktok-shop-reviews) | 1 credit |
| [Scrape eBay search results](/api-reference/endpoint/ebay-search) | 1 credit |
| [Scrape an eBay item page](/api-reference/endpoint/ebay-item) | 1 credit |
| [Scrape Facebook Marketplace search results](/api-reference/endpoint/facebook-marketplace-search) | 1 credit |
| [Scrape Trustpilot search results](/api-reference/endpoint/trustpilot-search) | 1 credit |
| [Scrape a Trustpilot company page](/api-reference/endpoint/trustpilot-company) | 1 credit |
| [Scrape a Trustpilot company's reviews](/api-reference/endpoint/trustpilot-company-reviews) | 1 credit |

## More ways to call it

### Scrape an Amazon product page

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

### Scrape Google Shopping results

<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.