> For the complete documentation index, see [llms.txt](https://docs.scraperapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scraperapi.com/getting-started/tutorials/api-tutorials/monitor-sellers-api.md).

# Monitor Sellers

API Playground is ScraperAPI's request builder for testing and configuring scraping requests. In this tutorial, you will use the API Playground to monitor sellers and MAP violations across your Amazon catalog. By the end, you will have a daily batch job that flags unauthorized sellers and price violations across every listing, so you can protect brand pricing without an enforcement team.

***

## Step 1: Configure the Amazon Offers endpoint

Open the [**API Playground**](https://dashboard.scraperapi.com/apiplayground) from the left sidebar.

1. Select scraping method: **Structured Data Endpoints**.
2. In the endpoint dropdown, select **Amazon Offer**.
3. Enter ASIN `B0BFC7WQ6R`. Set **Country** to `us`.
4. Review the Summary panel on the right to understand the cost of the job before you run it.
5. Scroll down to the generated code and click **Try it**.

The Playground runs the request and shows the response inline. Each entry in the `listings` array includes `seller_name`, `price`, `shipping_price`, `condition`, `pinned_offer`, and `fullfilled_by_amazon`.

{% hint style="info" %}
Use the language dropdown to switch to Python, Node.js, PHP, Ruby, or Java. Click **Copy to clipboard** to run the request in your own terminal instead.
{% endhint %}

## Step 2: Additional options and filters

Use **Additional options & filters** to fine-tune your request. The Playground adds the relevant parameters to the generated code automatically.

* **Country code** adds `country_code`. Targets a specific Amazon marketplace — use `gb` for Amazon UK, `de` for Germany, and so on.
* **Domain** adds `domain`. Sets the Amazon domain (e.g. `co.uk`, `com.au`).
* **Output format** adds `output_format`. Returns results as `json` (default) or `csv`.
* **Condition** adds `condition`. Filters offers by item condition (e.g. new, used).
* **Activate retrying 404 responses** adds `retry_404`. Retries requests that return a 404 instead of treating them as final.

{% hint style="info" %}
Some parameters increase the cost per request. Check the Summary panel before committing to a configuration at scale.
{% endhint %}

## Step 3: Prepare your reference files

**authorized\_sellers.txt** — one seller name per line:

```
Official Brand Store
Authorized Distributor West
Brand Direct
```

**map\_prices.csv** — ASIN and minimum advertised price:

```
B0BFC7WQ6R,24.99
B08KHL5KKL,49.99
B086B88TGR,14.99
```

## Step 4: Submit a batch across your catalog

Switch the scraping method to **Async** in the Playground and paste your ASINs as full structured endpoint URLs, one per line:

```
https://api.scraperapi.com/structured/amazon/offers?asin=B0BFC7WQ6R&country=us
https://api.scraperapi.com/structured/amazon/offers?asin=B08KHL5KKL&country=us
https://api.scraperapi.com/structured/amazon/offers?asin=B086B88TGR&country=us
```

## Step 5: Poll for results

Async jobs run in the background. Use the `statusUrl` from the batch response to check progress. When `status` is `finished`, read `response.body` from each job result. Compare `seller_name` against `authorized_sellers.txt` and `price` against `map_prices.csv`. Flag any seller not on the allowlist, and any price below the MAP threshold.

```bash
STATUS_URL="https://async.scraperapi.com/jobs/YOUR_JOB_ID"

while true; do
  STATUS=$(curl -s "$STATUS_URL" | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")
  echo "Status: $STATUS"
  if [ "$STATUS" = "finished" ]; then break; fi
  sleep 10
done
```

## Step 6: Deliver to cloud storage and skip polling

Instead of polling, configure a destination in your dashboard under **Destinations** and add a `callback` to your batch request. Results land in your bucket automatically when each job finishes — ready for your violation check script to process.

```bash
curl -X POST "https://async.scraperapi.com/batchjobs" \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "API_KEY",
    "urls": ["..."],
    "callback": {
      "type": "s3",
      "url": "my-destination-name"
    }
  }'
```

## Step 7: Schedule daily

To run your batch automatically on a recurring schedule, add it to your crontab. The example below runs every day at 6am.

```bash
0 6 * * * /usr/bin/bash /path/to/monitor_sellers.sh >> /var/log/seller_monitor.log 2>&1
```

***

{% hint style="info" %}
Prefer a no-code setup? [Monitor sellers with DataPipeline instead](/getting-started/tutorials/no-code-tutorials/monitor-sellers-no-code.md).
{% endhint %}

## More API tutorials

* [Scrape any URL](/getting-started/tutorials/api-tutorials/any-url-api.md)
* [Track prices across Amazon and Walmart](/getting-started/tutorials/api-tutorials/track-prices-api.md)
* [Track daily keyword rankings](/getting-started/tutorials/api-tutorials/keyword-rankings-api.md)
* [Monitor Google Shopping prices](/getting-started/tutorials/api-tutorials/google-shopping-api.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scraperapi.com/getting-started/tutorials/api-tutorials/monitor-sellers-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
