# Bonanza Marketplace Scraper (`muhammadafzal/bonanza-marketplace-scraper`) Actor

Scrape public Bonanza marketplace listings, prices, shipping, seller data, item traits, images, and descriptions by keyword or URL.

- **URL**: https://apify.com/muhammadafzal/bonanza-marketplace-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $13.00 / 1,000 bonanza listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bonanza Marketplace Scraper

> **Free-plan limit:** Apify free-plan users receive at most 5 delivered records per run. Paid users may use the Actor’s configured result limit.

Scrape public Bonanza marketplace listings for product research, resale sourcing, catalog monitoring, and competitive pricing. Enter keyword searches, public Bonanza search/category/booth URLs, or a listing URL. The Actor returns one normalized JSON record per unique listing in the default dataset.

### What it extracts

Without detail enrichment, records contain the item ID, title, canonical listing URL, displayed price and currency, shipping text, primary image, featured flag, source type, and scrape timestamp. Enable `includeDetails` to visit each product page and add:

- condition, availability, quantity, category, brand, model, UPC, and normalized item traits;
- all full-size product images and the public seller booth URL/username;
- seller rating and transaction count when shown;
- shipping origin, offer-policy signal, and the seller's plain-text description.

Fields that Bonanza does not expose are returned as `null`; missing arrays and trait maps are returned as empty collections. Search cards can show truncated titles, so use `includeDetails` when the full product title matters.

### Input

| Field | Description |
| --- | --- |
| `searchQueries` | Array of keyword searches. Defaults to `vintage camera`. |
| `startUrls` | Public `bonanza.com` search, category, booth, or listing URLs. Queries and URLs are combined and deduplicated. |
| `maxItems` | Maximum unique listings across the run (1–10,000; default 20). |
| `includeDetails` | Visit each listing page for traits, seller information, images, and description. Adds one detail-enrichment event per enriched row. |
| `sortBy` | Keyword-search ordering: `relevancy`, `price_desc`, `price_asc`, `newest`, or `seller_rating`. |
| `minPrice`, `maxPrice` | Optional bounds applied to the displayed currency for the run's locale. |
| `maxPagesPerSource` | Pagination safety limit (1–100; default 20). |
| `maxConcurrency` | Browser-page concurrency (1–10; default 3). Lower values reduce rate-limit/challenge risk. |
| `proxyConfiguration` | Apify Proxy configuration. Use Residential if Bonanza challenges datacenter sessions. |

Example keyword input:

```json
{
  "searchQueries": ["vintage camera", "polaroid land camera"],
  "maxItems": 25,
  "includeDetails": true,
  "sortBy": "price_asc",
  "proxyConfiguration": { "useApifyProxy": true }
}
```

Example URL input:

```json
{
  "startUrls": [
    { "url": "https://www.bonanza.com/booths/vintage_finders?item_sort_options%5Bfilter_category_id%5D=625" },
    { "url": "https://www.bonanza.com/listings/Example/1234567890" }
  ],
  "maxItems": 10,
  "includeDetails": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### Output

The default dataset is homogeneous: each item is a listing record. The `SUMMARY` key-value record contains the outcome classification (`DATA`, `EMPTY`, `BLOCKED`, `REJECTED`, or `FAILED`), pages attempted, warnings, records returned, and detail-event count. Access the dataset and summary from the Output tab or the API links exposed by `output_schema.json`.

### Billing

This Actor uses pay-per-event pricing. The Actor start event is synthetic. Each validated listing written to the default dataset is the primary result event, and each detail-enriched row may add one `detail-enrichment` event. Empty, rejected, blocked, and failed runs do not create result charges. The run stops when Apify's configured maximum total charge prevents another detail event.

When a direct `/listings/` URL is supplied, the product page must be opened to identify the listing, so that row is treated as detail-enriched and can incur the detail event even if `includeDetails` is false.

### Reliability and limits

The crawler uses Playwright, bounded concurrency, persistent Crawlee sessions, retry limits, and challenge-aware diagnostics. Bonanza may return a Cloudflare managed challenge depending on IP reputation, geography, or request volume. The Actor never submits CAPTCHAs, uses login cookies, or fabricates listings; switch to a permitted Residential proxy route or use a public source URL when a run is classified as `BLOCKED`.

The Actor reads only public pages. Respect Bonanza's Terms of Use, robots directives, applicable law, and reasonable request rates. Do not use it to access private seller dashboards, accounts, or authentication-gated content.

### Local development

```bash
npm ci
npm test
npm start
```

`npm test` builds the TypeScript source and runs parser/lifecycle-independent unit tests. Cloud runs should use a small `maxItems` first, then increase gradually while watching challenge rate, runtime, and event charges.

### FAQ

#### Does this require a Bonanza login or API key?

No. The default path uses public Bonanza pages and does not accept or store login cookies. Bonanza can still challenge a network identity; configure Apify Proxy and keep concurrency low.

#### Can it scrape a seller booth?

Yes. Add a public `/booths/{seller}` URL to `startUrls`. The Actor follows the booth's public listing pagination until `maxItems` or `maxPagesPerSource` is reached.

#### Are prices always in USD?

No. Bonanza localizes displayed prices by session. The `currency` field reports the visible currency code when present, and price filters apply to that displayed currency. Use a consistent proxy geography when comparing runs.

#### Why did a run return zero records?

Check `SUMMARY`: `EMPTY` means the page loaded and no matching public listings were found; `BLOCKED` means Bonanza challenged or denied every usable request; `REJECTED` means the input was invalid. A blocked run never writes a fake placeholder record.

### Pricing

This Actor uses **pay-per-event** pricing. These are the current Apify Store event prices:

| Event | Price (USD) | When it is charged |
|---|---:|---|
| `apify-default-dataset-item` | FREE: $0.018; BRONZE: $0.017; SILVER: $0.016; GOLD: $0.013; PLATINUM: $0.013; DIAMOND: $0.013 | Bonanza listing — One normalized Bonanza listing saved to the default dataset. |
| `detail-enrichment` | FREE: $0.03; BRONZE: $0.028; SILVER: $0.025; GOLD: $0.022; PLATINUM: $0.022; DIAMOND: $0.022 | Detail enrichment — Adds product-page traits, seller data, images, availability, and description to one saved listing. |
| `apify-actor-start` | $0.005 | Actor Start — Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). — Charged once per run. |

Apify platform usage for this Actor run is included alongside the event prices above; no separate per-run platform-usage fee is passed to users.

This covers Apify platform usage for this Actor run. Other Apify products or usage outside this Actor run may still follow your account plan.

# Actor input Schema

## `searchQueries` (type: `array`):

Product names or keywords to search on Bonanza. Use this for price research, reseller sourcing, catalog discovery, or marketplace monitoring. Queries and Start URLs are combined and deduplicated.

## `startUrls` (type: `array`):

Public bonanza.com search, category, booth, or /listings/ URLs. Listing URLs are scraped directly; collection pages are paginated until the result limit is reached.

## `maxItems` (type: `integer`):

Maximum unique listing records returned across all queries and URLs. The default is deliberately small for a fast, low-cost first run.

## `includeDetails` (type: `boolean`):

Visit each listing page to add condition, availability, quantity, traits, seller rating, all images, shipping origin, and description. This is slower and adds a detail-enrichment event per enriched record.

## `sortBy` (type: `string`):

Sort keyword searches before collection. Start URLs keep the sorting encoded in their URL.

## `minPrice` (type: `number`):

Return only listings whose displayed price is at least this amount. The unit is the currency displayed by Bonanza for the run's locale.

## `maxPrice` (type: `number`):

Return only listings whose displayed price is no more than this amount. Must be greater than or equal to Minimum price.

## `maxPagesPerSource` (type: `integer`):

Safety limit for search, category, and booth pagination. Bonanza typically shows up to 60 organic results per page.

## `maxConcurrency` (type: `integer`):

Number of browser pages processed in parallel. Keep this low to reduce challenge and rate-limit risk.

## `proxyConfiguration` (type: `object`):

Connection routing for Bonanza. Apify Proxy is recommended on cloud runs; switch to Residential if datacenter sessions receive repeated Cloudflare challenges.

## Actor input object example

```json
{
  "searchQueries": [
    "vintage camera"
  ],
  "startUrls": [],
  "maxItems": 20,
  "includeDetails": false,
  "sortBy": "relevancy",
  "maxPagesPerSource": 20,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

Normalized marketplace records written to the default dataset.

## `summary` (type: `string`):

Outcome classification, counters, warnings, and billing diagnostics.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "vintage camera"
    ],
    "maxItems": 20,
    "includeDetails": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/bonanza-marketplace-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["vintage camera"],
    "maxItems": 20,
    "includeDetails": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/bonanza-marketplace-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "vintage camera"
  ],
  "maxItems": 20,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call muhammadafzal/bonanza-marketplace-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/bonanza-marketplace-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oHASNzCPt2GeneVs2/builds/dCQlC6p0Z6K2beqAK/openapi.json
