# 🛒✨ eBay Search Scraper (`scrapio/ebay-search-scraper`) Actor

🛒✨ eBay Search Scraper pulls live marketplace data from eBay search results—titles, prices, shipping, seller ratings, condition, bids, Buy It Now, images & URLs. ⚡ Ideal for price monitoring, competitor analysis, product research & SEO-ready catalogs.

- **URL**: https://apify.com/scrapio/ebay-search-scraper.md
- **Developed by:** [Scrapio](https://apify.com/scrapio) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## eBay Search Scraper (Apify Actor)

Scrapes eBay search result pages, extracts listing URLs, then fetches each product page and outputs structured JSON (same shape as the standalone `extract_product_data` pipeline).

### Input

- **`urls`** — Bulk search or item URLs (or use **`startUrls`** or **`query`** + `domain`, `max_pages`, …).
- **`proxyConfiguration`** — Optional Apify Proxy. Runs **without proxy first**; on block: **datacenter → residential** (up to **3** residential retries), then **sticky residential** for remaining requests.
- **`maxItems`**, **`parallel_workers`**, **`session_batch`**, **`request_delay`**, **`cooldown_between_batches`**, **`fetch_description_iframe`** — Same behavior as the original script.

### Output

Dataset items: full product objects (`listing_card`, `images`, `shipping_section_module`, …) plus `source_url`.

### Local run

```bash
pip install -r requirements.txt
set APIFY_LOCAL_STORAGE_DIR=storage
## UTF-8 INPUT.json without BOM:
## storage\key_value_stores\default\INPUT.json
python -m src
````

**Direct listing URLs:** If every `urls` entry is an `/itm/` listing link, the actor skips search-page fetching and scrapes those items only (matches bulk “paste item links” use cases).

**Proxy:** With `proxyConfiguration.useApifyProxy: true` on Apify, blocked direct requests escalate: datacenter → residential (3 retries), then sticky residential.

# Actor input Schema

## `query` (type: `string`):

Type what you want to find — products, brands, categories. This drives your search together with Country & filters below. ☕ Example: coffee, vintage camera, running shoes.

## `domain` (type: `string`):

Which eBay storefront to search — prices, currency, and inventory follow the site you pick. 🌐

## `location` (type: `string`):

Roughly where items should ship — helps align search results with buyer / delivery context. ✈️

## `sort` (type: `string`):

How listings are ranked — best match, ending soon, newest, price high/low, distance, and more. 📊

## `show_only` (type: `array`):

Optional shortcuts: sold ✔️, free shipping 🚚, returns ↩️, deals 🏷️, authenticity ✓, charity ❤️, and more — pick what matters to you.

## `buying_format` (type: `string`):

Auction 🔔 · Buy It Now 🛍️ · Accepts offers 💬 — focus on how the listing is sold.

## `max_pages` (type: `integer`):

How many search result pages to walk — more pages = more candidate listings (then capped by Max listings). 📚

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

Hard cap on rows in your dataset this run — great for samples (small) or big sweeps (up to limit). 📥

## `useProxy` (type: `boolean`):

When on, the Actor can route traffic through Apify Proxy (configure groups below). 🔐

## `fetch_description_iframe` (type: `boolean`):

Slower ⏱️ but richer: pulls more seller description text when eBay exposes it. Great for detail-heavy listings.

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

Fine-tune Apify Proxy (groups, sessions) for your workspace — used when 🛡️ Use Apify Proxy is enabled.

## Actor input object example

```json
{
  "query": "coffee",
  "domain": "ebay.com",
  "location": "1",
  "sort": "12",
  "show_only": [],
  "buying_format": "BIN",
  "max_pages": 1,
  "maxItems": 20,
  "useProxy": true,
  "fetch_description_iframe": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "query": "coffee",
    "show_only": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapio/ebay-search-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 = {
    "query": "coffee",
    "show_only": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapio/ebay-search-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "query": "coffee",
  "show_only": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapio/ebay-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapio/ebay-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🛒✨ eBay Search Scraper",
        "description": "🛒✨ eBay Search Scraper pulls live marketplace data from eBay search results—titles, prices, shipping, seller ratings, condition, bids, Buy It Now, images & URLs. ⚡ Ideal for price monitoring, competitor analysis, product research & SEO-ready catalogs.",
        "version": "0.1",
        "x-build-id": "o19CMaafAliNyldMe"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapio~ebay-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapio-ebay-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapio~ebay-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapio-ebay-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapio~ebay-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapio-ebay-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "🔎 Search query",
                        "type": "string",
                        "description": "Type what you want to find — products, brands, categories. This drives your search together with Country & filters below. ☕ Example: coffee, vintage camera, running shoes.",
                        "default": "coffee"
                    },
                    "domain": {
                        "title": "🌍 Country (eBay site)",
                        "enum": [
                            "ebay.com.au",
                            "ebay.at",
                            "ebay.ca",
                            "ebay.fr",
                            "ebay.de",
                            "ebay.com.hk",
                            "ebay.ie",
                            "ebay.it",
                            "ebay.com.my",
                            "ebay.nl",
                            "ebay.ph",
                            "ebay.pl",
                            "ebay.com.sg",
                            "ebay.es",
                            "ebay.ch",
                            "ebay.co.uk",
                            "ebay.com"
                        ],
                        "type": "string",
                        "description": "Which eBay storefront to search — prices, currency, and inventory follow the site you pick. 🌐",
                        "default": "ebay.com"
                    },
                    "location": {
                        "title": "📍 Ship-to location",
                        "enum": [
                            "1",
                            "2",
                            "3",
                            "4",
                            "5",
                            "6",
                            "7",
                            "8",
                            "9",
                            "10",
                            "11",
                            "12",
                            "13",
                            "14",
                            "15",
                            "16",
                            "17",
                            "18",
                            "19",
                            "20",
                            "21",
                            "22",
                            "23",
                            "24",
                            "25",
                            "26",
                            "27",
                            "28",
                            "29",
                            "30",
                            "31",
                            "32",
                            "33",
                            "34",
                            "35",
                            "36",
                            "37",
                            "38",
                            "39",
                            "40",
                            "41",
                            "42",
                            "43",
                            "44",
                            "45",
                            "46",
                            "47",
                            "48",
                            "49",
                            "50",
                            "51",
                            "52",
                            "53",
                            "55",
                            "56",
                            "57",
                            "58",
                            "59",
                            "60",
                            "61",
                            "62",
                            "63",
                            "64",
                            "65",
                            "66",
                            "67",
                            "68",
                            "69",
                            "70",
                            "71",
                            "72",
                            "73",
                            "74",
                            "75",
                            "76",
                            "77",
                            "78",
                            "79",
                            "80",
                            "81",
                            "82",
                            "83",
                            "84",
                            "85",
                            "86",
                            "87",
                            "88",
                            "89",
                            "90",
                            "91",
                            "92",
                            "93",
                            "94",
                            "95",
                            "96",
                            "99",
                            "100",
                            "101",
                            "102",
                            "104",
                            "105",
                            "106",
                            "107",
                            "108",
                            "109",
                            "111",
                            "112",
                            "113",
                            "114",
                            "115",
                            "116",
                            "120",
                            "121",
                            "122",
                            "123",
                            "124",
                            "125",
                            "126",
                            "127",
                            "128",
                            "129",
                            "130",
                            "131",
                            "132",
                            "133",
                            "134",
                            "135",
                            "136",
                            "137",
                            "138",
                            "139",
                            "140",
                            "141",
                            "142",
                            "143",
                            "144",
                            "145",
                            "146",
                            "147",
                            "148",
                            "149",
                            "150",
                            "151",
                            "152",
                            "153",
                            "154",
                            "155",
                            "156",
                            "157",
                            "158",
                            "159",
                            "160",
                            "161",
                            "162",
                            "163",
                            "164",
                            "165",
                            "166",
                            "167",
                            "168",
                            "169",
                            "170",
                            "171",
                            "172",
                            "173",
                            "174",
                            "175",
                            "176",
                            "177",
                            "178",
                            "179",
                            "180",
                            "181",
                            "182",
                            "183",
                            "184",
                            "185",
                            "186",
                            "187",
                            "189",
                            "191",
                            "192",
                            "193",
                            "196",
                            "197",
                            "198",
                            "199",
                            "200",
                            "201",
                            "202",
                            "203",
                            "204",
                            "205",
                            "206",
                            "207",
                            "208",
                            "209",
                            "210",
                            "211",
                            "212",
                            "213",
                            "214",
                            "215",
                            "216",
                            "217",
                            "218",
                            "219",
                            "220",
                            "221",
                            "226",
                            "227",
                            "228",
                            "229"
                        ],
                        "type": "string",
                        "description": "Roughly where items should ship — helps align search results with buyer / delivery context. ✈️",
                        "default": "1"
                    },
                    "sort": {
                        "title": "⬆️ Sort order",
                        "enum": [
                            "12",
                            "1",
                            "10",
                            "15",
                            "16",
                            "7",
                            "3",
                            "2"
                        ],
                        "type": "string",
                        "description": "How listings are ranked — best match, ending soon, newest, price high/low, distance, and more. 📊",
                        "default": "12"
                    },
                    "show_only": {
                        "title": "🏷️ Show only",
                        "type": "array",
                        "description": "Optional shortcuts: sold ✔️, free shipping 🚚, returns ↩️, deals 🏷️, authenticity ✓, charity ❤️, and more — pick what matters to you.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "completed_items",
                                "sold_items",
                                "free_returns",
                                "returns_accepted",
                                "authorized_seller",
                                "deals_and_savings",
                                "sale_items",
                                "listed_as_lots",
                                "benefits_charity",
                                "authenticity_guarantee",
                                "free_shipping",
                                "local_pickup"
                            ],
                            "enumTitles": [
                                "✅ Completed items",
                                "🏷️ Sold items",
                                "↩️ Free returns",
                                "📋 Returns accepted",
                                "⭐ Authorized seller",
                                "🏷️ Deals & savings",
                                "💸 Sale items",
                                "📦 Listed as lots",
                                "❤️ Benefits charity",
                                "✓ Authenticity Guarantee",
                                "🚚 Free shipping",
                                "📍 Local pickup"
                            ]
                        }
                    },
                    "buying_format": {
                        "title": "🛒 Buying format",
                        "enum": [
                            "Auction",
                            "BIN",
                            "BO"
                        ],
                        "type": "string",
                        "description": "Auction 🔔 · Buy It Now 🛍️ · Accepts offers 💬 — focus on how the listing is sold.",
                        "default": "BIN"
                    },
                    "max_pages": {
                        "title": "📄 Max pages to scrape",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many search result pages to walk — more pages = more candidate listings (then capped by Max listings). 📚",
                        "default": 1
                    },
                    "maxItems": {
                        "title": "🎯 Max listings to scrape",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Hard cap on rows in your dataset this run — great for samples (small) or big sweeps (up to limit). 📥",
                        "default": 20
                    },
                    "useProxy": {
                        "title": "🛡️ Use Apify Proxy",
                        "type": "boolean",
                        "description": "When on, the Actor can route traffic through Apify Proxy (configure groups below). 🔐",
                        "default": true
                    },
                    "fetch_description_iframe": {
                        "title": "📜 Fetch full item description",
                        "type": "boolean",
                        "description": "Slower ⏱️ but richer: pulls more seller description text when eBay exposes it. Great for detail-heavy listings.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "🌐 Proxy configuration",
                        "type": "object",
                        "description": "Fine-tune Apify Proxy (groups, sessions) for your workspace — used when 🛡️ Use Apify Proxy is enabled."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
