# 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:** 59 total users, 3 monthly users, 100.0% runs succeeded, 2 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/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

## 🏠 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(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 '{
  "city": "newyork",
  "categories": [
    "sss"
  ],
  "searchQuery": "bike",
  "maxListings": 50,
  "maxPages": 2
}' |
apify call primeparse/craigslist-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,primeparse/craigslist-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/qre2XsjzO8eLDaQuu/builds/RxoX3jLX6B3GkUzLo/openapi.json
