# Craigslist Scraper: Jobs, Housing & For Sale Listings (`primeparse/craigslist-scraper`) Actor

Extract Craigslist jobs, housing rentals, for sale items & more from any US city. Multi-category scraper with keyword filtering. No proxy required. Ideal for leads, real estate, job monitoring.

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

## 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/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: Multi-Category Listings Extractor

Enterprise-grade Craigslist scraper that automatically extracts listings from multiple categories — For Sale, Jobs, Housing, Services, and more — clean, structured, and ready for market research, job tracking, or data analysis.

**High-quality Craigslist Web Scraper for Researchers, Analysts, and Data Teams**

Automatically collects listings from any Craigslist city and category — clean, structured, ready for analysis or integration.

**Built for:**

- Market researchers & analysts
- Real estate professionals tracking housing trends
- Job market analysts monitoring employment opportunities
- Data scientists building market intelligence systems
- Researchers tracking local economy trends

✅ **Multi-category scraping** (For Sale, Jobs, Housing, Services, etc.)  
✅ **City-based filtering** (any Craigslist city)  
✅ **Smart search query filtering**  
✅ **Rich metadata** (title, price, location, date posted, URL)  
✅ **Automatic pagination handling**  
✅ **Rate limiting & respectful crawling**

👉 **Runs on Apify • No code required • Pay only for compute used**

### 🚀 Why This Scraper

✔ **Multi-Category Support**  
Scrape multiple categories simultaneously (For Sale + Jobs + Housing) in a single run.

✔ **City Flexibility**  
Works with any Craigslist city (newyork, losangeles, chicago, sanfrancisco, etc.).

✔ **Smart Search Filtering**  
Optional search queries to filter listings by keywords (e.g., "iphone", "developer", "apartment").

✔ **Clean & Structured Output**  
Consistent JSON format with title, price, location, date posted, and direct URLs.

✔ **Respectful Crawling**  
Built-in delays between requests and pages to avoid overloading servers.

✔ **Fast & Efficient**  
Powered by Python + BeautifulSoup + httpx — optimized for static HTML content.

✔ **Safe & Controlled**  
Automatic pagination limits, request throttling, and configurable max listings.

### 💼 Use Cases

- **Market Research** — Track pricing trends across cities and categories
- **Job Market Analysis** — Monitor employment opportunities by location
- **Real Estate Intelligence** — Track housing availability and pricing
- **Competitive Intelligence** — Monitor local business listings
- **Academic Research** — Study local economy and market dynamics
- **Data Collection** — Build datasets for ML/AI training

### 📊 Supported Categories

- **sss** — For Sale (electronics, furniture, vehicles, etc.)
- **jjj** — Jobs (full-time, part-time, contract positions)
- **hhh** — Housing (apartments, houses, rooms for rent)
- **ccc** — Community (activities, events, local news)
- **eee** — Events (concerts, festivals, meetups)
- **ggg** — Gigs (one-time jobs, freelance work)
- **rrr** — Resumes (job seekers)
- **bbb** — Services (professional services, business services)

### ⚙️ How It Works

1. Provide city code and select categories
2. Optionally add search query and set limits
3. Run the Actor
4. Download clean, structured listing datasets

### 🧩 Input Configuration

#### Example JSON Input

```json
{
  "city": "newyork",
  "categories": ["sss", "jjj", "hhh"],
  "searchQuery": "bike",
  "maxListings": 100,
  "maxPages": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

#### Single Category Example

```json
{
  "city": "losangeles",
  "categories": ["jjj"],
  "searchQuery": "developer",
  "maxListings": 50,
  "maxPages": 1
}
```

#### Multiple Categories Without Search

```json
{
  "city": "chicago",
  "categories": ["sss", "hhh"],
  "searchQuery": "",
  "maxListings": 200,
  "maxPages": 3
}
```

#### Key Options

- **city** — City code for Craigslist (required)
  - Examples: `newyork`, `losangeles`, `chicago`, `sanfrancisco`, `boston`, `seattle`
  - Format: lowercase, no spaces (e.g., `newyork` not `new-york`)

- **categories** — Array of category codes to scrape (required)
  - Options: `sss` (For Sale), `jjj` (Jobs), `hhh` (Housing), `ccc` (Community), `eee` (Events), `ggg` (Gigs), `rrr` (Resumes), `bbb` (Services)
  - Can select multiple: `["sss", "jjj"]` scrapes both For Sale and Jobs

- **searchQuery** — Optional search query to filter listings
  - Examples: `"iphone"`, `"developer"`, `"apartment"`, `"bike"`
  - Leave empty (`""`) to get all listings in category

- **maxListings** — Maximum number of listings to scrape (default: 50, max: 1000)
  - Applies across all categories combined
  - Stops when limit is reached

- **maxPages** — Maximum number of pages per category (default: 2, max: 10)
  - Each page contains ~120 listings
  - Higher values = more data but longer runtime

- **proxyConfiguration** — Proxy settings for anti-bot protection
  - Use Apify Proxy: `{"useApifyProxy": true}`
  - Custom proxies: `{"proxyUrls": ["http://user:pass@host:port"]}`

### 📂 Output Dataset

All listings are saved to a single dataset with the following structure:

#### Example Output Record

```json
{
  "title": "Huffy Disney Minnie 12\" Bike Girls Bicycle Two Wheeler$30Staten Island",
  "price": "$30",
  "location": "Staten Island",
  "datePosted": "2024-01-15T12:00:00",
  "url": "https://newyork.craigslist.org/stn/bik/d/staten-island-huffy-disney-minnie-12/7890496670.html"
}
```

#### Field Descriptions

- **title** — Full listing title text
- **price** — Price if available (e.g., `"$100"`, `"$1,500"`)
- **location** — Location/neighborhood if specified
- **datePosted** — Date when listing was posted (ISO format when available)
- **url** — Direct link to the listing page

#### Output Notes

- Empty fields (`""`) indicate data not available for that listing
- All URLs are absolute and ready to use
- Data is deduplicated within each run
- Results are sorted by page order (newest first)

### 🏁 Getting Started

#### Quick Start on Apify

1. Click **"Try for free"** on the Actor page
2. Enter city code (e.g., `newyork`)
3. Select categories (e.g., `["sss", "jjj"]`)
4. Optionally add search query
5. Set max listings and pages
6. Click **Run**
7. Download your dataset when complete

### 📋 Popular City Codes

| City | Code | Example URL |
|------|------|-------------|
| New York | `newyork` | https://newyork.craigslist.org |
| Los Angeles | `losangeles` | https://losangeles.craigslist.org |
| Chicago | `chicago` | https://chicago.craigslist.org |
| San Francisco | `sanfrancisco` | https://sanfrancisco.craigslist.org |
| Boston | `boston` | https://boston.craigslist.org |
| Seattle | `seattle` | https://seattle.craigslist.org |
| Miami | `miami` | https://miami.craigslist.org |
| Dallas | `dallas` | https://dallas.craigslist.org |

*Note: Use lowercase, no spaces or hyphens. Check Craigslist for your city's exact code.*

### ⚠️ Important Notes

#### Legal Disclaimer

⚠️ **This scraper is for educational and personal use only.**

Please respect Craigslist's Terms of Service and use responsibly. Craigslist prohibits automated scraping in their Terms of Service, so use this tool at your own discretion.

**Best Practices:**

- Start with small volumes (default `maxListings: 50`)
- Use built-in rate limiting (automatic delays)
- Consider using Apify proxies for high-volume runs
- Test on specific city/category combinations before scaling
- Respect robots.txt and server resources

### 🛠️ Technical Details

#### Performance

- **Speed:** ~2-5 seconds per page (with delays)
- **Throughput:** ~120 listings per page
- **Memory:** Low footprint, efficient parsing
- **Reliability:** Automatic retries and error handling

#### Limitations

- Static HTML parsing (no JavaScript rendering)
- Rate limiting built-in (2s delay between pages)
- Max 1000 listings per run
- Max 10 pages per category

### 📧 Support

- **Issues:** Use Apify Issues tab on Actor page
- **Email**: **kidaxxb@gmail.com**

### 🏷️ Tags

`craigslist`, `web-scraping`, `listings`, `market-research`, `real-estate`, `jobs`, `housing`, `data-extraction`, `apify`, `python`, `beautifulsoup`, `market-intelligence`, `local-data`, `classifieds`

***

**Built with ❤️ on Apify**

# Actor input Schema

## `city` (type: `string`):

City code for Craigslist (e.g., 'newyork' for https://newyork.craigslist.org)

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

Category codes to scrape (e.g., \['sss', 'jjj'] for For Sale and Jobs)

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

Optional search query to filter listings (e.g., 'iphone')

## `maxListings` (type: `integer`):

Maximum number of listings to scrape (default: 50)

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

Maximum number of pages to scrape (default: 2)

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

Proxy settings for anti-bot protection

## Actor input object example

```json
{
  "city": "newyork",
  "categories": [
    "sss"
  ],
  "searchQuery": "bike",
  "maxListings": 50,
  "maxPages": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "city": "newyork",
    "categories": [
        "sss"
    ],
    "searchQuery": "bike",
    "maxListings": 50,
    "maxPages": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("primeparse/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 = {
    "city": "newyork",
    "categories": ["sss"],
    "searchQuery": "bike",
    "maxListings": 50,
    "maxPages": 2,
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Craigslist Scraper: Jobs, Housing & For Sale Listings",
        "description": "Extract Craigslist jobs, housing rentals, for sale items & more from any US city. Multi-category scraper with keyword filtering. No proxy required. Ideal for leads, real estate, job monitoring.",
        "version": "0.0",
        "x-build-id": "RxoX3jLX6B3GkUzLo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/primeparse~craigslist-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-primeparse-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/primeparse~craigslist-scraper/runs": {
            "post": {
                "operationId": "runs-sync-primeparse-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/primeparse~craigslist-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-primeparse-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": [
                    "city",
                    "categories"
                ],
                "properties": {
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "City code for Craigslist (e.g., 'newyork' for https://newyork.craigslist.org)",
                        "default": "newyork"
                    },
                    "categories": {
                        "title": "Categories",
                        "type": "array",
                        "description": "Category codes to scrape (e.g., ['sss', 'jjj'] for For Sale and Jobs)",
                        "items": {
                            "type": "string",
                            "enum": [
                                "sss",
                                "jjj",
                                "hhh",
                                "ccc",
                                "eee",
                                "ggg",
                                "rrr",
                                "bbb"
                            ],
                            "enumTitles": [
                                "For Sale",
                                "Jobs",
                                "Housing",
                                "Community",
                                "Events",
                                "Gigs",
                                "Resumes",
                                "Services"
                            ]
                        },
                        "default": [
                            "sss"
                        ]
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Optional search query to filter listings (e.g., 'iphone')",
                        "default": ""
                    },
                    "maxListings": {
                        "title": "Max Listings",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of listings to scrape (default: 50)",
                        "default": 50
                    },
                    "maxPages": {
                        "title": "Max Pages",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape (default: 2)",
                        "default": 2
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for anti-bot protection",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
