# Craigslist Scraper (`gio21/craigslist-scraper`) Actor

Scrape Craigslist classifieds across any US/CA/world city. For sale, jobs, housing, gigs, services, community, events. Multi-city + multi-category. Uses Craigslist API for fast extraction with price, GPS, images, URLs. $0.005/listing.

- **URL**: https://apify.com/gio21/craigslist-scraper.md
- **Developed by:** [Gio](https://apify.com/gio21) (community)
- **Categories:** Lead generation, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$5.00 / 1,000 listing scrapeds

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/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

## Craigslist Scraper

Scrape Craigslist classified ads across **any city, any category**, fast.

Uses Craigslist's own public API (`sapi.craigslist.org`), the same endpoint the site loads from in your browser. No browser, no proxy required, no Cloudflare in the way. Typical run: **360 listings in ~2 seconds**.

> Cheaper and friendlier than the alternative: **$0.005 / listing** (vs $0.008 elsewhere = 37% less). No URL gymnastics — just pass a city slug and a category code.

### What it extracts

| Field | Description |
|---|---|
| `postingId` | Craigslist posting ID |
| `title` | Listing title |
| `price` | Formatted price (e.g. `"$60"`) |
| `priceNumeric` | Price as integer (USD) |
| `city` | City slug from input |
| `category` | Category code (e.g. `sss`) |
| `categoryLabel` | Human-readable category |
| `subareaCode` | City subarea (e.g. `que`, `mnh`, `lgi`) |
| `location` | Neighborhood / location description |
| `latitude`, `longitude` | GPS coordinates |
| `images` | Image URLs (600x450) |
| `imageCount` | Number of images |
| `slug` | URL slug |
| `url` | Direct link to the posting |
| `datePosted` | ISO timestamp of when the post was created |
| `anonymousPosterId` | Craigslist anonymous poster ID |
| `scrapedAt` | When this row was scraped |

### How to use

#### Input

| Field | Required | Description |
|---|---|---|
| `cities` | yes | Array of city slugs. Examples: `newyork`, `losangeles`, `sfbay`, `chicago`, `washingtondc`, `seattle`, `austin`, `denver`, `miami`, `boston`, `toronto`, `london`, `sydney`. See the full list at https://www.craigslist.org/about/sites. |
| `categories` | yes | Array of category codes (see below). |
| `searchTerm` | no | Free-text keyword filter (e.g. `iphone`, `software engineer`, `studio apartment`). |
| `minPrice` | no | Minimum price (USD). |
| `maxPrice` | no | Maximum price (USD). |
| `hasImage` | no | If true, only return listings with images. |
| `postedToday` | no | If true, only return listings from the last 24 hours. |
| `maxItems` | no | Total listings cap across all combinations (default 100). |

#### Common category codes

| Code | Category |
|---|---|
| `sss` | For sale (everything) |
| `cta` | Cars + trucks |
| `apa` | Apts/housing for rent |
| `hhh` | Housing (all) |
| `jjj` | Jobs (all) |
| `ggg` | Gigs |
| `ppp` | Services |
| `bbb` | Community |
| `vvv` | Events |
| `rrr` | Resumes |

#### Example: iPhones for sale in NY + LA

```json
{
  "cities": ["newyork", "losangeles"],
  "categories": ["sss"],
  "searchTerm": "iphone",
  "maxItems": 200
}
````

#### Example: apartments for rent under $3000 in San Francisco

```json
{
  "cities": ["sfbay"],
  "categories": ["apa"],
  "maxPrice": 3000,
  "hasImage": true,
  "maxItems": 100
}
```

#### Example: software engineer jobs in 5 cities

```json
{
  "cities": ["newyork", "sfbay", "seattle", "austin", "boston"],
  "categories": ["jjj"],
  "searchTerm": "software engineer",
  "maxItems": 500
}
```

### Pricing

**$0.005 per listing** (pay-per-event). No platform usage cost.

| Volume | Cost |
|---|---|
| 100 listings | $0.50 |
| 1,000 listings | $5.00 |
| 10,000 listings | $50.00 |

Free Apify plan: limited to 25 listings per run.

### Why this scraper

| Feature | This scraper | ivanvs/craigslist-scraper-pay-per-result |
|---|---|---|
| Price per listing | **$0.005** | $0.008 |
| Input | City + category + filters | Pre-built URL only |
| Multi-city/multi-category | ✅ in one run | One URL per run |
| Speed | ~2s per 360 listings | Slower (HTML parsing) |
| GPS coordinates | ✅ | Not extracted |
| Multi-resolution images | ✅ 600×450 + originals | Single thumbnail |
| Date/time of post | ✅ ISO timestamp | Often missing |

### How it works

- Calls `https://sapi.craigslist.org/web/v8/postings/search/full?searchPath={cat}&...` — the same API Craigslist uses internally.
- First request returns 360 items; subsequent batches return 1080 each.
- Each item is a compact tagged array — we decode `postingId`, GPS, prices, images, slug, and a few more fields via the same lookup table the website JS uses.
- got-scraping handles TLS fingerprinting so Cloudflare on the API edge stays happy.
- Charges `listing-scraped` once per pushed listing.

# Actor input Schema

## `cities` (type: `array`):

Craigslist city slug(s) — the subdomain part. Examples: `newyork`, `losangeles`, `sfbay`, `chicago`, `washingtondc`, `seattle`, `boston`, `miami`, `austin`, `denver`, `toronto`, `vancouver`, `london`, `sydney`. Find yours at https://www.craigslist.org/about/sites.

## `categories` (type: `array`):

Craigslist category codes. Common: `sss` = for-sale (all), `cta` = cars+trucks, `jjj` = jobs, `hhh` = housing, `apa` = apts/housing for rent, `ggg` = gigs, `ppp` = services, `bbb` = community, `vvv` = events, `rrr` = resumes.

## `searchTerm` (type: `string`):

Free-text query to filter results (e.g. `iphone`, `studio apartment`, `software engineer`). Leave empty to scrape everything in the chosen category.

## `minPrice` (type: `integer`):

Filter listings by minimum price (USD). Only applies to categories that have prices.

## `maxPrice` (type: `integer`):

Filter listings by maximum price (USD). Only applies to categories that have prices.

## `hasImage` (type: `boolean`):

If true, only return listings that have at least one image.

## `postedToday` (type: `boolean`):

If true, only return listings posted in the last 24 hours.

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

Maximum total listings to scrape across all (city × category) combinations.

## Actor input object example

```json
{
  "cities": [
    "newyork"
  ],
  "categories": [
    "sss"
  ],
  "hasImage": false,
  "postedToday": false,
  "maxItems": 50
}
```

# Actor output Schema

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

Scraped Craigslist listings.

# 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 = {
    "cities": [
        "newyork"
    ],
    "categories": [
        "sss"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("gio21/craigslist-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 = {
    "cities": ["newyork"],
    "categories": ["sss"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("gio21/craigslist-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 '{
  "cities": [
    "newyork"
  ],
  "categories": [
    "sss"
  ],
  "maxItems": 50
}' |
apify call gio21/craigslist-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Craigslist Scraper",
        "description": "Scrape Craigslist classifieds across any US/CA/world city. For sale, jobs, housing, gigs, services, community, events. Multi-city + multi-category. Uses Craigslist API for fast extraction with price, GPS, images, URLs. $0.005/listing.",
        "version": "0.0",
        "x-build-id": "X2KryEzF8O7HcmVaY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gio21~craigslist-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gio21-craigslist-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/gio21~craigslist-scraper/runs": {
            "post": {
                "operationId": "runs-sync-gio21-craigslist-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/gio21~craigslist-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-gio21-craigslist-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",
                "required": [
                    "cities",
                    "categories"
                ],
                "properties": {
                    "cities": {
                        "title": "Cities",
                        "type": "array",
                        "description": "Craigslist city slug(s) — the subdomain part. Examples: `newyork`, `losangeles`, `sfbay`, `chicago`, `washingtondc`, `seattle`, `boston`, `miami`, `austin`, `denver`, `toronto`, `vancouver`, `london`, `sydney`. Find yours at https://www.craigslist.org/about/sites.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "categories": {
                        "title": "Categories",
                        "type": "array",
                        "description": "Craigslist category codes. Common: `sss` = for-sale (all), `cta` = cars+trucks, `jjj` = jobs, `hhh` = housing, `apa` = apts/housing for rent, `ggg` = gigs, `ppp` = services, `bbb` = community, `vvv` = events, `rrr` = resumes.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerm": {
                        "title": "Keyword (optional)",
                        "type": "string",
                        "description": "Free-text query to filter results (e.g. `iphone`, `studio apartment`, `software engineer`). Leave empty to scrape everything in the chosen category."
                    },
                    "minPrice": {
                        "title": "Minimum price (optional)",
                        "type": "integer",
                        "description": "Filter listings by minimum price (USD). Only applies to categories that have prices."
                    },
                    "maxPrice": {
                        "title": "Maximum price (optional)",
                        "type": "integer",
                        "description": "Filter listings by maximum price (USD). Only applies to categories that have prices."
                    },
                    "hasImage": {
                        "title": "Only listings with images",
                        "type": "boolean",
                        "description": "If true, only return listings that have at least one image.",
                        "default": false
                    },
                    "postedToday": {
                        "title": "Only posts from today",
                        "type": "boolean",
                        "description": "If true, only return listings posted in the last 24 hours.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max listings",
                        "type": "integer",
                        "description": "Maximum total listings to scrape across all (city × category) combinations.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
