# Walmart Scraper

## Endpoint

```
POST https://api.crawlbyte.ai/api/tasks
```

## Basic Configuration (Required)

```json
{
  "type": "walmart",
  "input": [
    "14091452016",
    "7778210362",
    "11653805194"
  ],
  "multithread": false
}
```

### Parameters

| Field       | Type    | Description                                            |
| ----------- | ------- | ------------------------------------------------------ |
| type        | string  | Always `"walmart"`                                     |
| input       | array   | Array of Walmart product IDs                           |
| multithread | boolean | Use `true` for faster processing with multiple threads |

## Advanced Configuration (Optional)

```json
{
  "type": "walmart",
  "input": [
    "14091452016",
    "7778210362",
    "11653805194"
  ],
  "fields": [
    "title",
    "price",
    "availability",
    "url",
    "image",
    "description",
    "rating",
    "upc",
    "model"
  ],
  "user_agent_preset": "chrome",
  "user_agent_custom": "",
  "proxy": "http://username:password@ip:port"
}
```

### Optional Parameters

| Field               | Type   | Description                                                                                                                                                        |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| fields              | array  | List of fields to scrape. Available options: `title`, `price`, `availability`, `url`, `image`, `description`, `rating`, `upc`, `model`. Leave empty to scrape all. |
| user\_agent\_preset | string | Preset user-agent. Options: `chrome`, `firefox`, `edge`, `opera`, `safari`, `ios-safari`, `android-chrome`, `custom`                                               |
| user\_agent\_custom | string | Used if `user_agent_preset` is `custom.`                                                                                                                           |
| proxy               | string | `http://username:password@ip:port`                                                                                                                                 |

## Pricing

* **$0.01 per successful task**\
  This is a pay-as-you-go pricing model — you're only charged when a Walmart task successfully returns product data.

You can view your current credit balance and usage history in the [Crawlbyte Dashboard](https://dash.crawlbyte.ai/).

## Response

The response contains metadata about the task. For `walmart` type, the most important fields are `status` and `result`.

```json
{
  "id": "bd3e89ed-815e-4395-98a3-521ede71cc4d",
  "status": "completed",
  "result": {
    // product data
  }
}
```

* `result` is a **JSON object,** that's the final scraped product data — no further polling is needed.

### Status Types

| Status     | Meaning                                                                    |
| ---------- | -------------------------------------------------------------------------- |
| queued     | Task was accepted and added to the processing queue.                       |
| processing | Task is currently running.                                                 |
| completed  | Task finished and product data was successfully collected.                 |
| failed     | Task encountered an error (e.g., invalid product ID, access denied, etc.). |

## Polling

If `status` is `queued` or `processing`, continue polling the task until it's completed or failed.

```
GET https://api.crawlbyte.ai/api/tasks/:id
```

* You’ll receive the same structure with an updated `status`.
* Only poll until you receive `completed` or `failed`.
* Recommended interval: **every 3–5 seconds**.

## SDK Usage

You can run this task using any official **Crawlbyte SDK**:

* [Go SDK](https://github.com/crawlbyte/crawlbyte-sdk-go)
* [TypeScript SDK](https://github.com/crawlbyte/crawlbyte-sdk-ts)
* [Python SDK](https://github.com/crawlbyte/crawlbyte-sdk-py)

Each SDK provides a simple way to:

* Create the task
* Poll for status
* Handle the final result

Refer to the [SDKs section](/sdks.md) for installation, examples, and setup instructions.

## Notes

* Only valid Walmart product IDs will return results.
* Crawlbyte handles retries, fingerprinting, and anti-bot logic internally — no need to configure anything manually.
* Use `multithread: true` in advanced settings when processing large volumes.
* If a specific field is missing in the result, it means the data wasn’t available or couldn’t be parsed — usually all supported fields are returned.
* Need more fields? Just contact our support and we’ll add them.
* Average task duration is \~2–3 seconds per product, depending on Walmart’s site response time.


---

# Agent Instructions: 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:

```
GET https://developers.crawlbyte.ai/walmart-scraper.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
