# Ebay Scraper Actor (`daddyapi/ebay-scraper-actor`) Actor

eBay scraper that searches by KEYWORD. No need to manually filter URLs. Enter a term (e.g., "iPhone 15", "Rolex Watch") and get thousands of results instantly.

- **URL**: https://apify.com/daddyapi/ebay-scraper-actor.md
- **Developed by:** [DaddyAPI](https://apify.com/daddyapi) (community)
- **Categories:** Automation, E-commerce, Integrations
- **Features:** Limited permissions
- **Stats:** 37 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## eBay Search Scraper

> **The efficient eBay scraper that searches by KEYWORD.** No need to manually filter URLs. Enter a term (e.g., "iPhone 15", "Rolex Watch") and get thousands of results instantly.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?style=for-the-badge\&logo=apify)](https://apify.com/store)
[![Node.js](https://img.shields.io/badge/Node.js-v22-green?style=for-the-badge\&logo=node.js)](https://nodejs.org/)

### 🚀 Why this scraper?

Most eBay scrapers require complex setup or fail against anti-bot protections. **That's slow and unscalable.**

**eBay Search Scraper** acts like a real user:

1. You provide a **Search Query** (e.g., "iPhone 15 Pro").
2. The actor navigates, searches, handles pagination, and extracts clean data.
3. It automatically handles different eBay layouts (List vs. Grid/Card).

**Perfect for:**

- 📉 **Price Monitoring:** Track market value of electronics.
- 📱 **Reselling:** Find undervalued iPhones or electronics for flip.
- 🔍 **Competitor Analysis:** See what others are charging.
- 📦 **Arbitrage:** Compare prices across conditions (New vs. Open Box).

***

### 🌍 Supported Features

We currently optimize for **ebay.com (US)** but the logic is robust for standard listings.

- **Search**: Keyword based.
- **Filters**: Condition (New, Used, Open Box, Refurbished).
- **Sorting**: Newest, Price, Best Match.
- **Layouts**: Supports both List and Gallery (Card) views.

***

### 📖 How to Use

#### Option 1: Apify Console (No Coding)

1. Go to the **Input** tab.
2. Enter your **Search Keyword** (e.g., `iPhone 15 Pro Max`).
3. (Optional) Select **Item Conditions** (e.g., `Used`, `Open Box`, `Refurbished`).
4. (Optional) Set **Sort By** to `newest` to get the latest listings.
5. **Proxy Selection:** Select "Apify Proxy" (**Residential required**) OR select your own custom proxy groups if you are renting the worker.
6. Click **Start**.
7. Download your data in Excel, CSV, or JSON format.

#### Option 2: API (Developers)

You can trigger this actor programmatically via REST API, Python, or Node.js.

##### Input Payload (JSON)

```json
{
    "searchQuery": "iPhone 15 Pro",
    
    "sortBy": "newest",
    // Options: "newest", "price_low", "price_high", "relevance"

    "itemConditions": ["3000", "1500"], 
    // Codes: 1000=New, 1500=Open Box, 3000=Used, 2000-2500=Refurbished

    "maxPages": 1,
    "maxRequestsPerCrawl": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US"
    }
}
```

##### 🐍 Python Example (Simple & Clean)

This script runs the scraper and saves the results to a local file. **Note: eBay requires high-quality proxies.**

```python
import json
from apify_client import ApifyClient

## 1. Configuration
APIFY_TOKEN = 'YOUR_APIFY_TOKEN'
ACTOR_ID = 'your-username/ebay-search-scraper'

client = ApifyClient(APIFY_TOKEN)

## 2. Define Input
run_input = {
    "searchQuery": "iPhone 15 Pro",
    "sortBy": "newest",
    "maxPages": 1,
    "itemConditions": ["3000", "1500"], # Used & Open Box
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US"
    }
}

print(f"🚀 Starting scraper for: {run_input['searchQuery']}...")

## 3. Run Actor
run = client.actor(ACTOR_ID).call(run_input=run_input)

if not run:
    print("❌ Failed to start run.")
    exit(1)

print(f"✅ Run finished! Status: {run['status']}")

## 4. Fetch & Save Results
dataset_client = client.dataset(run["defaultDatasetId"])
items = dataset_client.list_items().items

filename = "results.json"
with open(filename, "w", encoding="utf-8") as f:
    json.dump(items, f, indent=2, ensure_ascii=False)

print(f"💾 Saved {len(items)} listings to {filename}")
```

***

### 🔒 Proxy Configuration

**⚠️ eBay has strict anti-bot measures.**

#### Residential Proxies (Required)

You **MUST** use Residential proxies. Datacenter proxies often result in 0 items or CAPTCHAs.

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
}
```

***

### 📊 Data Output

The scraper returns highly detailed, structured data for every listing:

```json
{
  "type": "search_result_ebay",
  "id": "123456789012",
  "url": "https://www.ebay.com/itm/123456789012",
  "title": "Apple iPhone 15 Pro - 128GB - Natural Titanium (Unlocked)",
  "price": {
    "display": "$999.00",
    "currency": "USD",
    "amount": 999.00
  },
  "shipping": "Free 2-day shipping",
  "condition": "Open box",
  "mainPhoto": "https://i.ebayimg.com/images/g/...",
  "status": "active"
}
```

***

### ⚙️ Configuration Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `searchQuery` | String | ✅ | - | What to search for. (e.g., "iPhone 15"). |
| `sortBy` | Enum | ❌ | `newest` | `newest`, `relevance`, `price_low`, `price_high`. |
| `itemConditions`| Array | ❌ | Used/Open/Refurb | Filter by condition codes. |
| `maxPages` | Integer | ❌ | `1` | Depth of scrape. 1 page ≈ 60 items. |
| `proxyConfiguration` | Object | ❌ | Auto | **Residential Proxies (US)** are strongly recommended. |

***

### 🛡️ Troubleshooting

- **Empty Results?** eBay might be serving a CAPTCHA or a different layout. Ensure you are using **Residential Proxies** from the US.
- **Blocked/403?** Your proxy is detected. Switch to Apify Proxy (Residential) or try again later.
- **Missing Fields?** Some sellers don't provide all info (e.g., specific shipping costs in the preview).

***

#### ⚖️ Legal & Ethics

This scraper is for educational and analytical purposes. Please respect eBay's Terms of Service and `robots.txt`. Do not use this tool to spam sellers or overload their servers. Use responsible rate limits.

# Actor input Schema

## `searchQuery` (type: `string`):

What item are you looking for? (e.g., 'Focusrite', 'Gibson Les Paul', 'Sony Camera')

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

Order in which items are scraped. 'newest' corresponds to Newly Listed.

## `maxPages` (type: `integer`):

How many pages of results to traverse. 1 page ≈ 60 items.

## `itemConditions` (type: `array`):

Filter by condition. Select one or multiple.

## `maxRequestsPerCrawl` (type: `integer`):

Hard limit on total requests.

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

⚠️ RESIDENTIAL PROXIES STRONGLY RECOMMENDED FOR EBAY.

## Actor input object example

```json
{
  "searchQuery": "iphone 16",
  "sortBy": "newest",
  "maxPages": 1,
  "itemConditions": [
    "3000",
    "1500"
  ],
  "maxRequestsPerCrawl": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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 = {
    "itemConditions": [
        "3000",
        "1500"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("daddyapi/ebay-scraper-actor").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 = { "itemConditions": [
        "3000",
        "1500",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("daddyapi/ebay-scraper-actor").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 '{
  "itemConditions": [
    "3000",
    "1500"
  ]
}' |
apify call daddyapi/ebay-scraper-actor --silent --output-dataset

```

## MCP server setup

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

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/PrwH3o9Udqhu80wDC/builds/hm4wJvacMtkk73HYh/openapi.json
