# Swappa Scraper (`lexis-solutions/swappa-scraper`) Actor

Scrape Swappa listings with structured data — price, condition, storage, carrier, seller info & more. Ideal for pricing analysis, market research & BI pipelines. Supports pagination & proxy config.

- **URL**: https://apify.com/lexis-solutions/swappa-scraper.md
- **Developed by:** [Lexis Solutions](https://apify.com/lexis-solutions) (community)
- **Categories:** E-commerce, AI, Agents
- **Stats:** 5 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.90 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Swappa Scraper

![banner](https://i.imgur.com/AfMPB73.png)

Swappa (swappa.com) is a US marketplace for used and refurbished consumer electronics. This actor collects structured listing detail data from Swappa category and listing pages.

### Introduction

The Swappa scraper starts from listing/category URLs, goes through result pages, and extracts structured listing data such as listing ID, title, images, condition, storage, carrier, seller information, shipping details, return policy, and payment information.

### Use Cases

- **Market research**: Track listing volume, device conditions, storage variants, and carrier distribution for selected product categories.
- **Pricing analysis**: Monitor listing prices and compare trends across devices, conditions, and sellers.
- **Seller intelligence**: Analyze seller ratings, trusted seller status, and shipping practices.
- **Analytics pipelines**: Feed BI tools, dashboards, and warehousing with structured marketplace listing data.

### Input

Provide the following fields:

- `startUrls` (array, required): Swappa category or listing URLs.
- `maxItems` (integer, optional): Maximum number of listing detail items to extract per start URL.
- `proxyConfiguration` (object, optional): Apify proxy settings.

Notes:

- If a `startUrl` is a Swappa listing/category page such as `/listings/apple-iphone-14`, the actor collects listing detail data from that category.
- The actor paginates through listing pages by incrementing the `page` query parameter while `maxItems` has not been reached.
- Crawling stops per source URL when `maxItems` is reached or when no more listing items are found.
- US proxy is recommended for better stability when scraping Swappa.

### Input Examples

**1) Start URLs**

```json
{
  "startUrls": [
    {
      "url": "https://swappa.com/listings/apple-iphone-11-pro-max"
    },
    {
      "url": "https://swappa.com/listings/apple-iphone-14?page=2"
    }
  ],
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

### Output

Each dataset item contains fields like:

```json
{
  "url": "https://swappa.com/listing/view/LADF60711",
  "listingId": "LADF60711",
  "title": "Apple iPhone 11 Pro Max",
  "price": "",
  "buyUrl": "https://swappa.com/login?next=/listing/view/LADF60711",
  "viewUrl": "https://swappa.com/listing/view/LADF60711",
  "images": [
    {
      "url": "https://static.swappa.com/images/cache/60/a6/60a666a82cef0ea3ec9a434fbb2e69dd.jpg"
    }
  ],
  "attributes": ["Fair", "256GB", "Green", "Unlocked", "A2161"],
  "condition": "Fair",
  "battery": null,
  "storage": "256GB",
  "color": "Green",
  "carrier": "Unlocked",
  "model": "A2161",
  "isFeatured": false,
  "headline": "Seller Damage Description",
  "conditionDetails": [
    "Noticeable wear and tear",
    "Power cord/charger not required"
  ],
  "sellerName": "JF PHONES",
  "sellerImage": "https://static.swappa.com/images/cache/97/8b/978b9b874033ee77a7897368514db060.jpg",
  "sellerLocation": "Appleton, WI",
  "sellerRating": "5.0 of 5.0 stars, 518 ratings",
  "sellerTrusted": true,
  "shippingInfo": ["Seller ships from Appleton, WI"],
  "returnPolicy": ["Swappa Return and Refund policies apply to all listings"],
  "paymentMethods": ["Seller accepts PayPal for payment"]
}
```

The scraper paginates through listing results and stops when `maxItems` is reached per start URL or when no more listing items are found.

### Why use the Swappa Scraper?

- **Focused**: Built specifically for Swappa listing/category flows.
- **Structured output**: Ready-to-use JSON records for automation and analysis.
- **Per-URL limits**: `maxItems` is enforced per start URL.
- **Pagination support**: Automatically follows `?page=` while the limit has not been reached.
- **Apify-native**: Works with Apify datasets, request queue, and proxy config.

### FAQ

- **How many listings can it extract?**\
  Controlled by `maxItems` per source URL.

- **Do I need proxies?**\
  Not always, but US proxies are recommended for larger runs and better stability.

- **Can I start from a detail URL?**\
  The actor is intended for listing/category URLs, but it can also accept Swappa-domain URLs depending on the routing rules.

- **What if Swappa changes their website structure?**\
  The actor may require updates to keep extraction stable.

### Need to scrape other marketplaces?

Check out our other scrapers:

- [Napaonline](https://apify.com/lexis-solutions/napaonline-scraper).
- [AutoZone](https://apify.com/lexis-solutions/auto-zone-com).
- [CARFAX](https://apify.com/lexis-solutions/carfax-com).
- [CarGurus](https://apify.com/lexis-solutions/cargurus-com).

***

**Need help or want a custom solution?**

Lexis Solutions is a certified Apify Partner. We can help with custom data extraction projects.

Contact us over [Email](mailto:scraping@lexis.solutions) or [LinkedIn](https://www.linkedin.com/company/lexis-solutions).

### Support Our Work

If you're happy with our work and scrapers, you're welcome to leave us a company review [here](https://apify.com/partners/find/lexis-solutions/review) and leave a review for the scrapers you're subscribed to.

### Image Credit

Image credit: [swappa.com](https://www.swappa.com/)

# Actor input Schema

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

Category or listing pages to start with.

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

Maximum number of listing details to scrape per original URL.

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

Your proxy configuration from Apify.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://swappa.com/listings/apple-iphone-11-pro-max"
    }
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://swappa.com/listings/apple-iphone-11-pro-max"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/swappa-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 = { "startUrls": [{ "url": "https://swappa.com/listings/apple-iphone-11-pro-max" }] }

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/swappa-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 '{
  "startUrls": [
    {
      "url": "https://swappa.com/listings/apple-iphone-11-pro-max"
    }
  ]
}' |
apify call lexis-solutions/swappa-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lexis-solutions/swappa-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/EOwels8ZfL0zXgGfP/builds/yVbMf7yxmyrUJNKcq/openapi.json
