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

> Search Amazon, Walmart, AliExpress, and any Shopify store. Get products, prices, bestsellers, and collections as structured JSON.

Search Amazon, Walmart, AliExpress, and any Shopify store. Get products, prices, bestsellers, and collections as structured JSON. 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.products);
  ```

  ```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"]["products"])
  ```

  ```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 --query "wireless earbuds"
  ```
</CodeGroup>

The response:

```json theme={null}
{
  "success": true,
  "data": {
    "products": [
      {
        "position": 1,
        "id": "abc123",
        "url": "https://example.com/",
        "title": "Example title",
        "image": "https://example.com/image.jpg",
        "price": 19.99,
        "originalPrice": 19.99,
        "currency": "USD",
        "rating": 4.5,
        "reviews": 1234,
        "boughtPastMonth": 1,
        "isSponsored": false
      }
    ],
    "total": 1234
  },
  "creditsUsed": 5,
  "requestId": "d83b5395-9974-488b-8016-ea9cdd5b3cc2"
}
```

## Endpoints

| Endpoint | Cost |
| - | - |
| [Search Amazon products](/api-reference/endpoint/amazon-search) | 5 credits per 20 items, at least 5 credits |
| [Get a product's price, details and rating](/api-reference/endpoint/amazon-product) | 5 credits |
| [Get the best sellers in a category](/api-reference/endpoint/amazon-bestsellers) | 2 credits per 50 items, at least 2 credits |
| [Get Amazon search suggestions for a keyword](/api-reference/endpoint/amazon-suggest) | 1 credit per 50 items, at least 1 credit |
| [Search Walmart products](/api-reference/endpoint/walmart-search) | 5 credits per 40 items, at least 5 credits |
| [Get a Walmart product's price and details](/api-reference/endpoint/walmart-product) | 3 credits |
| [Search AliExpress products](/api-reference/endpoint/aliexpress-search) | 2 credits per 60 items, at least 2 credits |
| [Get an AliExpress product's price and details](/api-reference/endpoint/aliexpress-product) | 2 credits |
| [Get a Shopify store's products](/api-reference/endpoint/shopify-products) | 1 credit per 25 items, at least 1 credit |
| [Get a Shopify store's collections](/api-reference/endpoint/shopify-collections) | 1 credit per 100 items, at least 1 credit |
| [Get a Shopify store's details](/api-reference/endpoint/shopify-store) | 1 credit |

## More ways to call it

### Search Walmart 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.walmart.search({ query: "air fryer" });
  console.log(result.data.products);
  ```

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

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.walmart.search(query="air fryer")
  print(result["data"]["products"])
  ```

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

  ```bash CLI icon="square-terminal" theme={null}
  stophy walmart search "air fryer"
  ```
</CodeGroup>

### Get a Shopify store's 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.shopify.products({ store: "allbirds.com", limit: 50 });
  console.log(result.data.products);
  ```

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

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.shopify.products(store="allbirds.com", limit=50)
  print(result["data"]["products"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/shopify/products \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"store":"allbirds.com","limit":50}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy shopify products allbirds.com --limit 50
  ```
</CodeGroup>

<Tip>Pass the product URL from a search result into the Amazon, Walmart, or AliExpress product lookup for full pricing and details.</Tip>
