# Costco Product Listing Scraper

Get product name, price, rating, etc. from Costco Wholesale by keyword.

- Template page: [https://www.octoparse.com/template/costco-product-listing-scraper](https://www.octoparse.com/template/costco-product-listing-scraper)
- Categories: E-Commerce
- Status: `PUBLISHED`
- Run mode: `BOTH`

## Pricing

Free.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from review pages, listing pages.

## Output

The current workflow extracts 7 fields, including `Detail_page`, `Image`, `Keyword`, `Name`, `Price`, `Rating`, `Review_count`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Keywords (up to 200) and start the template in local or cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Keywords (up to 200)

Required. Enter a list of keywords to search on Costco Wholesale Constraints: minItems=1; maxItems=200; items.minLength=1; items.maxLength=5000.

## How to Use

# Costco Product Listing Scraper

Collects structured records from Costco listing pages: Keyword, Name, Price, Detail_page, Image, Rating, Review_count. Data source: [Costco](https://www.costco.com/).

## Pricing

Free. No per-line fee. Octoparse plan or resource limits may apply.

## Input

- **Keywords** (Required) — Enter up to 200 keywords to search on Costco.

## Output Fields

- `Keyword`
- `Name`
- `Price`
- `Detail_page`
- `Image`
- `Rating`
- `Review_count`

## How to Use

1. Open the template and click **Try it!**.
2. Fill in **Keywords** (up to 200 entries).
3. Choose local or cloud run and start the task.
4. Export the rows (fields include `Name`, `Price`, `Keyword`, etc.).

## Tips

- Start with a focused keyword list for easy review.
- Keep `Keyword` in the export to trace each row to its input.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [Costco Product Details Scraper](https://www.octoparse.com/template/costco-product-details-scraper)
- [Google Shopping Product Listing Scraper](https://www.octoparse.com/template/google-shopping-product-listing-scraper)
- [Rakuten Product Listing Scraper](https://www.octoparse.com/template/rakuten-product-listing-scraper)
- [AutoScout24 Product Listing Scraper](https://www.octoparse.com/template/autoscout24-product-listing-scraper)
- [Amazon Product Listing Scraper(for Spain)](https://www.octoparse.com/template/amazon-espana-listados-scraper)

## Input Schema

```json
{
  "title": "Costco Product Listing Scraper input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "keywords": {
      "title": "Keywords (up to 200)",
      "description": "Enter a list of keywords to search on Costco Wholesale",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 5000
      },
      "minItems": 1,
      "maxItems": 200,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [
    "keywords"
  ]
}
```

## Input JSON Example

Example 1

```json
{
  "keywords": [
    "Battery"
  ]
}
```

Example 2

```json
{
  "keywords": [
    "Battery"
  ]
}
```

Example 3

```json
{
  "keywords": [
    "Battery"
  ]
}
```

Example 4

```json
{
  "keywords": [
    "Battery"
  ]
}
```

Example 5

```json
{
  "keywords": [
    "Battery"
  ]
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "Detail_page": {
      "type": "string",
      "description": ""
    },
    "Image": {
      "type": "string",
      "description": ""
    },
    "Keyword": {
      "type": "string",
      "description": ""
    },
    "Name": {
      "type": "string",
      "description": ""
    },
    "Price": {
      "type": "string",
      "description": ""
    },
    "Rating": {
      "type": "string",
      "description": ""
    },
    "Review_count": {
      "type": "string",
      "description": ""
    }
  },
  "title": "Costco Product Listing Scraper output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "Detail_page": "https://www.costco.com/p/-/goldfish-baked-snack-crackers-cheddar-1-oz-45-count/100371248",
  "Image": "https://gdx-assets.costco.com/adobe/assets/urn:aaid:aem:a4bd095f-451a-4ed9-925a-57ceb3e158fe/as/100371248-847__1.avif?width=320&height=320&fit=contain",
  "Keyword": "Battery",
  "Name": "Goldfish Baked Snack Crackers, Cheddar, 1 oz, 45-count",
  "Price": "Online Price\n\n$15\n.\n99",
  "Rating": "Average rating is 4.70 out of 5 stars. ",
  "Review_count": "796"
}
```

Example 2

```json
{
  "Detail_page": "https://www.costco.com/p/-/goldfish-baked-snack-crackers-cheddar-1-oz-45-count/100371248",
  "Image": "https://gdx-assets.costco.com/adobe/assets/urn:aaid:aem:a4bd095f-451a-4ed9-925a-57ceb3e158fe/as/100371248-847__1.avif?width=320&height=320&fit=contain",
  "Keyword": "Battery",
  "Name": "Goldfish Baked Snack Crackers, Cheddar, 1 oz, 45-count",
  "Price": "Online Price\n\n$15\n.\n99",
  "Rating": "Average rating is 4.70 out of 5 stars. ",
  "Review_count": "793"
}
```

Example 3

```json
{
  "Detail_page": "https://www.costco.com/p/-/goldfish-baked-snack-crackers-cheddar-1-oz-45-count/100371248",
  "Image": "https://gdx-assets.costco.com/adobe/assets/urn:aaid:aem:a4bd095f-451a-4ed9-925a-57ceb3e158fe/as/100371248-847__1.avif?width=320&height=320&fit=contain",
  "Keyword": "Battery",
  "Name": "Goldfish Baked Snack Crackers, Cheddar, 1 oz, 45-count",
  "Price": "Online Price\n\n$15\n.\n99",
  "Rating": "Average rating is 4.70 out of 5 stars. ",
  "Review_count": "792"
}
```

Example 4

```json
{
  "Detail_page": "https://www.costco.com/p/-/goldfish-baked-snack-crackers-cheddar-1-oz-45-count/100371248",
  "Image": "https://gdx-assets.costco.com/adobe/assets/urn:aaid:aem:a4bd095f-451a-4ed9-925a-57ceb3e158fe/as/100371248-847__1.avif?width=320&height=320&fit=contain",
  "Keyword": "Battery",
  "Name": "Goldfish Baked Snack Crackers, Cheddar, 1 oz, 45-count",
  "Price": "Online Price\n\n$15\n.\n99",
  "Rating": "Average rating is 4.70 out of 5 stars. ",
  "Review_count": "791"
}
```

Example 5

```json
{
  "Detail_page": "https://www.costco.com/p/-/goldfish-baked-snack-crackers-cheddar-1-oz-45-count/100371248",
  "Image": "https://gdx-assets.costco.com/adobe/assets/urn:aaid:aem:a4bd095f-451a-4ed9-925a-57ceb3e158fe/as/100371248-847__1.avif?width=320&height=320&fit=contain",
  "Keyword": "Battery",
  "Name": "Goldfish Baked Snack Crackers, Cheddar, 1 oz, 45-count",
  "Price": "Online Price\n\n$15\n.\n99",
  "Rating": "Average rating is 4.70 out of 5 stars. ",
  "Review_count": "790"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "costco-product-listing-scraper",
  "taskName": "Costco Product Listing Scraper",
  "parameters": "{\"keywords\":[\"Battery\"]}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"keywords\":[\"Battery\"]}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "costco-product-listing-scraper",
        "taskName": "Costco Product Listing Scraper",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "costco-product-listing-scraper",
  "taskName": "Costco Product Listing Scraper",
  "parameters": "{\"keywords\":[\"Battery\"]}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `costco-product-listing-scraper`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/costco-product-listing-scraper.json)
- [Manifest](https://www.octoparse.com/templates/costco-product-listing-scraper-manifest.json)
