# Craigslist Search Listings Scraper (`myagizm/craigslist-scraper`) Actor

Extract public Craigslist search listings by URL with titles, prices, locations and direct links.

- **URL**: https://apify.com/myagizm/craigslist-scraper.md
- **Developed by:** [MYM](https://apify.com/myagizm) (community)
- **Categories:** Jobs, E-commerce, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.89 / 1,000 listings

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?

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

## Craigslist Search Listings Scraper

[Run the actor](https://console.apify.com/actors) · [Actor page](https://apify.com/myagizm/craigslist-scraper) · [Apify API](https://docs.apify.com/api/v2)

Scrape public Craigslist search results by region and category. Get one clean record per posting with its headline, displayed price, location, category, search term and direct listing URL. Turn on detail fetching to add the public description, image links and posting date. The default setup is prefilled with a real search URL, so you can inspect the output before changing anything.

> Start with the prefilled search and check the first listings in a couple of minutes.

### Table of contents

- [What this actor collects](#what-this-actor-collects)
- [Who uses it](#who-uses-it)
- [Fields in the dataset](#fields-in-the-dataset)
- [Run a search](#run-a-search)
- [Input reference](#input-reference)
- [Output example](#output-example)
- [Pricing](#pricing)
- [Limits and data notes](#limits-and-data-notes)
- [Tips](#tips)
- [API and integrations](#api-and-integrations)
- [FAQ](#faq)
- [Want other marketplace data?](#want-other-marketplace-data)
- [Related searches](#related-searches)
- [Disclaimer](#disclaimer)
- [Resources](#resources)
- [中文说明](#中文说明)

### What this actor collects

- Reads search-result pages from Craigslist regional sites.
- Returns the listing headline, displayed price, location label, category, search term, region and a direct public listing URL.
- Deduplicates a posting if it appears in more than one supplied search result.
- Optionally opens up to 25 result pages for additional public fields: description, image URLs and posting date.
- Keeps the raw record flat, so the important values appear in the Apify table and CSV exports without opening nested JSON.
- Fails the run when Craigslist returns an access challenge or when the search produces no usable rows. A successful process with an empty dataset is not reported as a successful scrape.

This is a search-results actor. It does not search Craigslist on your behalf from a free-text keyword field. Create the search on Craigslist, copy its result URL, and submit that URL here.

### Who uses it

- Buyers comparing local prices for furniture, electronics, vehicles or household goods.
- Researchers measuring listing volume across cities or categories.
- Rental and property teams collecting public search-result references.
- Job teams monitoring public Craigslist job search pages.
- Small businesses tracking public listings for second-hand inventory.
- Analysts who need a repeatable CSV instead of copying search results by hand.

### Fields in the dataset

| Field | Type | Availability | Description |
| --- | --- | --- | --- |
| `id` | string | Always | Stable posting identifier taken from the result URL. |
| `title` | string | Always | Listing headline shown in the search result. |
| `url` | URL | Always | Direct public Craigslist listing link. |
| `price` | string or null | When shown | Price text shown on the result card. Craigslist does not provide a price for every category or listing. |
| `location` | string | Always | Location label on the result card; it can be an empty string. |
| `searchTerm` | string | Always | `query` or `purveyor` value from the submitted URL, or an empty string if the URL has no such parameter. |
| `sourceArea` | string | Always | Regional subdomain used for the search, such as `sfbay` or `newyork`. |
| `category` | string or null | Always | Category path segment, for example `sss` for for-sale-by-owner search results. |
| `description` | string or null | With details | Public text from the listing page, when available. No separate email or phone field is extracted. |
| `imageUrls` | string array | Always | Exact Craigslist image URLs found on the listing page; empty when details are off or no images are present. |
| `postedAt` | date-time or null | With details | Posting timestamp parsed from the public listing page. |
| `detailsIncluded` | boolean | Always | `true` when detail fields were fetched for this row. |

The `Listings` dataset view shows the headline, price, location, category, region, search term, posting time, detail status and direct link. `Full JSON` contains the entire record, including image URLs and description.

### Run a search

1. Open Craigslist and choose a city, category and search terms.
2. Copy the resulting `https://<area>.craigslist.org/search/...` URL.
3. Paste one or more search URLs into `searchUrls`.
4. Choose a result limit. The maximum is 100 unique listings per run.
5. Keep `includeDetails` off for a quick search-page export. Turn it on when you also need public descriptions, image URLs and posting dates.
6. Start the actor and open the `Listings` dataset view.

Example input:

```json
{
  "searchUrls": [
    "https://sfbay.craigslist.org/search/sss?query=desk",
    "https://newyork.craigslist.org/search/sss?query=desk"
  ],
  "maxItems": 30,
  "maxPages": 1,
  "includeDetails": false
}
```

The actor accepts up to 10 URLs. They may point to different regions, categories or search terms. Results are deduplicated across those URLs by posting ID. `maxItems` applies to the entire run, not separately to each URL.

### Input reference

| Input | Type | Required | Default | Limits |
| --- | --- | --- | --- | --- |
| `searchUrls` | array of strings | Yes | Prefilled with a San Francisco Bay Area furniture search | 1–10 HTTPS Craigslist search-result URLs. |
| `maxItems` | integer | No | 30 | 1–100 unique rows across the run. |
| `maxPages` | integer | No | 1 | 1–5 pages per URL; the overall `maxItems` cap still applies. |
| `includeDetails` | boolean | No | false | Fetch detail fields for no more than the first 25 results. |

Use the region's Craigslist host in each URL. For example, a search on the San Francisco Bay Area site should use `sfbay.craigslist.org`, and one on New York should use `newyork.craigslist.org`. The actor rejects non-Craigslist hosts, non-HTTPS URLs and paths that are not search pages. This keeps a copied URL within the expected public surface.

A canonical Apify input can contain either strings or `{ "url": "..." }` objects. The input form here uses strings so it remains easy to paste a URL list.

### Output example

The following fields were returned together by a live run on a public Craigslist result and its detail page. Seller contact data is not included in this example.

```json
{
  "id": "i6CFBdoA8yFNkgzk36LUCs",
  "title": "Wave-Shaped Desk with Glass Shelf & Matching File Cabinet | As-Is",
  "url": "https://www.craigslist.org/view/d/santa-clara-wave-shaped-desk-with-glass/i6CFBdoA8yFNkgzk36LUCs",
  "price": "$20",
  "location": "santa clara",
  "searchTerm": "desk",
  "sourceArea": "sfbay",
  "category": "sss",
  "description": "Unique wave-shaped desk, approximately 6 feet wide, with a curved organic profile. The desk is supported on one end by a matching gray metal 2-drawer file cabinet...",
  "imageUrls": [
    "https://images.craigslist.org/00q0q_30PFZqnCv5J_0CI0t2_600x450.jpg"
  ],
  "postedAt": "2026-08-02T05:15:48.000Z",
  "detailsIncluded": true
}
```

Descriptions are text taken from the public post. Common email and phone patterns are redacted from the description, but this actor does not return contact fields. Image links point to Craigslist's image host and remain subject to the posting's availability.

### Pricing

This actor charges per dataset item. The configured rate is **$0.89 per 1,000 returned listings**. A result is billed only after it is written to the dataset. Invalid inputs, access challenges, and empty results write no rows and therefore create no result charge.

The configured price is below the named competitor `fatihtahta/craigslist-scraper`'s current $0.99 per 1,000 at the GOLD tier and below `solidcode/craigslist-scraper` at $1.30 per 1,000 at GOLD. The competing products expose additional contact or filter fields; this actor keeps the initial scope focused on public search results and optional detail text, images and dates. Prices on the Store can change; check each actor's current pricing page before comparing.

Craigslist is fetched directly. This actor does not use a paid proxy or a paid data API. Measured direct response traffic is recorded in run diagnostics; it is not a proxy-billed byte count.

### Limits and data notes

- Only public search-result pages and the public detail pages linked from those results are read.
- The URL must use HTTPS, a `craigslist.org` hostname and a `/search/` path.
- The run accepts at most 10 search URLs, at most 5 pages per URL and at most 100 unique output rows overall.
- Search result pages can change while a run is in progress. A listing can disappear before its optional detail page is fetched; in that case the search row remains and detail fields can be empty.
- Detail collection covers at most 25 rows per run. Other rows still have their search-result fields and `detailsIncluded` is `false`.
- A price or location may be missing because Craigslist did not show it on the search card.
- A returned image link may stop working if the original listing or image is removed.
- The actor does not claim that a listing is still available, accurate, safe or endorsed by Craigslist.
- If Craigslist returns a challenge, the run fails instead of storing an empty dataset as a success. Do not run repeated retries against an explicit access block.

### Tips

- Use Craigslist's own search page to select the right city and category, then copy the URL instead of constructing the path by hand.
- Start with one URL and a small `maxItems` value. Confirm the region, category and search term in the output before increasing the cap.
- For a city comparison, use the same query in several regional URLs. The `sourceArea` field keeps the origin clear.
- Turn on `includeDetails` only when the added text and images are useful. It creates up to 25 extra public page requests and increases run time and transferred bytes.
- Use the direct `url` field to revisit the original listing. The posting ID is useful for deduplication across scheduled runs.
- Keep a dated copy of your dataset if you are tracking market changes. Craigslist listings can be edited or removed after collection.
- For broad searches, send multiple narrow Craigslist URLs instead of trying to encode unrelated terms into one search.
- Set `maxPages` to 1 for a quick check. Raise it only when the first result page does not cover the records you need.
- Use the `Full JSON` view when you need all fields in one export; the overview table stays compact for quick review.

### API and integrations

The actor can run from the Apify Console, the API, schedules, webhooks and integrations that can start an Apify Actor and read its default dataset.

Run synchronously and get the run object:

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~craigslist-scraper/run-sync" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchUrls":["https://sfbay.craigslist.org/search/sss?query=desk"],"maxItems":10,"maxPages":1,"includeDetails":false}'
```

Start an asynchronous run:

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~craigslist-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchUrls":["https://newyork.craigslist.org/search/sss?query=chair"],"maxItems":20,"includeDetails":true}'
```

Fetch the run's default dataset after it finishes:

```bash
curl "https://api.apify.com/v2/datasets/$DATASET_ID/items?clean=true&format=json" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

For a compact table, request `?view=overview`. For all fields, use the default `/items` endpoint or the `full` view. Replace `$APIFY_TOKEN` and `$DATASET_ID` with your own values; do not paste secrets into public task inputs or shared logs.

### FAQ

#### Does this actor accept a keyword by itself?

No. Paste a Craigslist search-results URL that already contains the region, category and any search term. The actor returns rows from that page; it does not create a new Craigslist search query.

#### Does it collect email addresses or phone numbers?

No separate contact fields are returned. The actor focuses on public listing data. Common email and phone patterns found in descriptions are redacted, but text in public posts can vary; review your local compliance requirements before using any collected content.

#### Why is `price` null?

Some Craigslist categories and posts do not show a price on the result card. The actor does not invent one or infer it from the title.

#### Why is `description` null?

Details are off by default. Set `includeDetails` to `true`. A post may also have been removed or may not expose a readable description.

#### Why did a run fail with no rows?

A run with no usable rows is treated as a failure. The actor also stops on an access challenge rather than returning a misleading successful empty dataset. No dataset items are written for a zero-result failure.

#### Does the actor scrape every Craigslist city?

It can read search URLs from multiple Craigslist regions, up to 10 inputs in one run. Supply the exact regional URLs you want; the actor does not enumerate every city automatically.

#### How many detail pages can it fetch?

Up to 25. If you request more than 25 result rows, the actor returns all requested rows up to `maxItems`, but detail fields are fetched only for the first 25.

#### Are results guaranteed to remain online?

No. Listings can be edited, deleted, expired or blocked after the run. Save the result URL and posting ID if you need to track a record over time.

#### Can I export CSV or Excel?

Yes. Export the dataset from Apify in CSV, Excel, JSON or another supported format. The fields are flat so spreadsheet columns are easy to filter.

### Want other marketplace data?

- [Amazon Product Scraper](https://apify.com/myagizm/amazon-product-scraper) for public product listings.
- [Zillow Scraper](https://apify.com/myagizm/zillow-scraper) for property search results.
- [Google Maps Scraper](https://apify.com/myagizm/google-maps-scraper) for local business listings.
- [Website Content Crawler](https://apify.com/myagizm/website-content-crawler) for public web pages.
- Browse the [myagizm actor profile](https://apify.com/myagizm) for other data collection tools.

### Related searches

Craigslist scraper · Craigslist search results scraper · Craigslist listings scraper · Craigslist listing data extractor · Craigslist furniture search scraper · Craigslist jobs search scraper · Craigslist housing search scraper · Craigslist for-sale scraper · Craigslist marketplace data · Craigslist price monitoring · Craigslist listing monitor · Craigslist local market research · Craigslist used furniture prices · Craigslist used car listings · Craigslist apartment search export · Craigslist rental listings data · Craigslist public post links · Craigslist city search scraper · Craigslist category search scraper · Craigslist listing CSV export · Craigslist regional listings dataset · Craigslist search URL scraper · Craigslist item price comparison · Craigslist secondhand inventory research · Craigslist service listings search · Craigslist gigs search data · Craigslist job listings export · Craigslist property listings search · Craigslist listing image links · Craigslist listing date extractor

### Disclaimer

This is an independent data collection tool and is not affiliated with, endorsed by or sponsored by Craigslist or its affiliates. It reads publicly accessible search and listing pages. You are responsible for following Craigslist's terms, applicable privacy rules and the laws that apply to your use of the data. Do not use the output to harass people, discriminate, or make decisions that require verified data without checking the original listing.

### Resources

- [Apify Actor documentation](https://docs.apify.com/platform/actors)
- [Apify API reference](https://docs.apify.com/api/v2)
- [Apify dataset exports](https://docs.apify.com/platform/storage/dataset)
- [Apify schedules](https://docs.apify.com/platform/schedules)
- [Apify integrations](https://docs.apify.com/platform/integrations)
- [Apify Store profile](https://apify.com/myagizm)

### 中文说明

[运行 Actor](https://console.apify.com/actors) · [Actor 页面](https://apify.com/myagizm/craigslist-scraper) · [Apify API 文档](https://docs.apify.com/api/v2)

这个 Actor 按地区和分类抓取 Craigslist 的公开搜索结果。每条记录包含标题、搜索页显示的价格、地点、分类、搜索词和原始帖子链接。打开详情抓取后，还会尝试读取公开描述、图片链接和发布时间。输入表单已经预填了一条真实搜索链接，可以先检查输出再替换成自己的查询。

> 先运行预填搜索，几分钟内就能检查第一批帖子。

### 目录

- [可以抓取哪些内容](#可以抓取哪些内容)
- [适用场景](#适用场景)
- [数据集字段](#数据集字段)
- [如何运行搜索](#如何运行搜索)
- [输入字段](#输入字段)
- [输出示例](#输出示例)
- [价格](#价格)
- [限制与数据说明](#限制与数据说明)
- [使用建议](#使用建议)
- [API 与集成](#api-与集成)
- [常见问题](#常见问题)
- [其他市场数据工具](#其他市场数据工具)
- [相关搜索](#相关搜索)
- [免责声明](#免责声明)
- [资源](#资源)

### 可以抓取哪些内容

- 读取 Craigslist 各地区网站的公开搜索结果页。
- 返回帖子标题、搜索结果卡片显示的价格、地点、分类、搜索词、地区和原始公开链接。
- 多个搜索页里出现相同帖子时，按帖子 ID 去重。
- 可选读取最多 25 个帖子详情页，增加公开描述、图片 URL 和发布时间。
- 主要字段保持扁平结构，便于 Apify 表格和 CSV 直接使用。
- 如果 Craigslist 返回访问挑战，或搜索没有可用结果，运行会失败，不会把空数据集伪装成成功结果。

这是一个搜索结果抓取工具。它不会根据单独的关键词自动创建 Craigslist 搜索。请先在 Craigslist 上选择地区、分类和关键词，再把结果页链接提交给 Actor。

### 适用场景

- 比较不同城市的家具、电子产品、车辆或家居用品价格。
- 统计公开分类和地区的帖子数量。
- 收集房地产或租赁搜索结果的原始链接。
- 监控公开的 Craigslist 工作、服务和零工搜索页面。
- 为二手商品库存研究整理公开列表。
- 将重复的手工复制工作替换为可重跑的 CSV 数据集。

### 数据集字段

| 字段 | 类型 | 可用情况 | 说明 |
| --- | --- | --- | --- |
| `id` | 字符串 | 始终 | 从帖子链接提取的稳定帖子 ID。 |
| `title` | 字符串 | 始终 | 搜索结果页显示的帖子标题。 |
| `url` | URL | 始终 | 原始公开 Craigslist 帖子链接。 |
| `price` | 字符串或 null | 页面有显示时 | 搜索结果卡片中的价格文本；某些分类或帖子没有价格。 |
| `location` | 字符串 | 始终 | 搜索卡片中的地点文本；如果页面未提供，可能为空字符串。 |
| `searchTerm` | 字符串 | 始终 | 从 URL 的 `query` 或 `purveyor` 参数读取；缺少时为空字符串。 |
| `sourceArea` | 字符串 | 始终 | 搜索使用的地区子域，例如 `sfbay` 或 `newyork`。 |
| `category` | 字符串或 null | 始终 | 搜索路径中的分类 slug，例如 `sss`。 |
| `description` | 字符串或 null | 启用详情时 | 公开帖子描述；没有可读描述时为空。 |
| `imageUrls` | 字符串数组 | 始终 | 详情页发现的 Craigslist 图片链接；未抓取详情时为空数组。 |
| `postedAt` | 日期时间或 null | 启用详情时 | 从公开帖子详情页解析的发布时间。 |
| `detailsIncluded` | 布尔值 | 始终 | `true` 表示已尝试并取得该行的详情字段。 |

详情页的描述文本会对常见电子邮件和电话号码格式进行屏蔽。Actor 不会生成单独的电话或邮箱字段。图片链接仍受 Craigslist 原帖及图片是否保留的影响。

数据集的 `Listings` 视图展示标题、价格、地点、分类、地区、搜索词、发布时间、详情状态和原帖链接。`Full JSON` 视图可查看完整记录，包括图片链接与描述。

### 如何运行搜索

1. 打开 Craigslist，选择地区、分类和关键词。
2. 复制生成的 `https://<地区>.craigslist.org/search/...` 搜索结果链接。
3. 把一个或多个链接放入 `searchUrls`。
4. 设置结果上限。每次运行最多返回 100 条唯一帖子。
5. 快速导出时保持 `includeDetails` 关闭；需要描述、图片链接和日期时再打开。
6. 启动 Actor 并打开 `Listings` 数据集视图。

示例输入：

```json
{
  "searchUrls": [
    "https://sfbay.craigslist.org/search/sss?query=desk",
    "https://newyork.craigslist.org/search/sss?query=desk"
  ],
  "maxItems": 30,
  "maxPages": 1,
  "includeDetails": false
}
```

一次运行最多接受 10 个 URL。不同 URL 可以使用不同地区、分类或搜索词。多个页面之间会按帖子 ID 去重。`maxItems` 是整个运行的总上限，不是每个 URL 各自的上限。

### 输入字段

| 输入 | 类型 | 必填 | 默认值 | 限制 |
| --- | --- | --- | --- | --- |
| `searchUrls` | 字符串数组 | 是 | 预填 San Francisco Bay Area 的家具搜索 | 1–10 个 HTTPS Craigslist 搜索页 URL。 |
| `maxItems` | 整数 | 否 | 30 | 整个运行返回 1–100 条唯一记录。 |
| `maxPages` | 整数 | 否 | 1 | 每个 URL 读取 1–5 页，但仍受 `maxItems` 总量限制。 |
| `includeDetails` | 布尔值 | 否 | false | 最多为前 25 条记录读取详情字段。 |

每个 URL 都应使用对应地区的 Craigslist 域名。例如旧金山湾区使用 `sfbay.craigslist.org`，纽约使用 `newyork.craigslist.org`。Actor 会拒绝非 Craigslist 域名、非 HTTPS 链接和非搜索页路径，避免把输入误用到其他网站。

输入表单使用字符串数组，便于粘贴链接。API 调用也可以使用标准 `{ "url": "..." }` 对象作为数组元素。

### 输出示例

以下字段来自一次真实的公开搜索和帖子详情运行。示例没有包含卖家的联系信息。

```json
{
  "id": "i6CFBdoA8yFNkgzk36LUCs",
  "title": "Wave-Shaped Desk with Glass Shelf & Matching File Cabinet | As-Is",
  "url": "https://www.craigslist.org/view/d/santa-clara-wave-shaped-desk-with-glass/i6CFBdoA8yFNkgzk36LUCs",
  "price": "$20",
  "location": "santa clara",
  "searchTerm": "desk",
  "sourceArea": "sfbay",
  "category": "sss",
  "description": "Unique wave-shaped desk, approximately 6 feet wide, with a curved organic profile. The desk is supported on one end by a matching gray metal 2-drawer file cabinet...",
  "imageUrls": [
    "https://images.craigslist.org/00q0q_30PFZqnCv5J_0CI0t2_600x450.jpg"
  ],
  "postedAt": "2026-08-02T05:15:48.000Z",
  "detailsIncluded": true
}
```

描述来自公开帖子，常见邮箱和电话号码格式会被屏蔽。字段不应替代对原帖的复核；帖子和图片可能在抓取后被编辑或删除。

### 价格

Actor 按数据集输出记录计费。当前设置为 **每 1,000 条记录 $0.89**。只有写入数据集的结果才会产生结果事件费用。无效输入、访问挑战和空结果不会写入数据行，因此不会产生结果行费用。

这个价格低于指定竞品 `fatihtahta/craigslist-scraper` 在 GOLD 层级的当前 $0.99/1,000，也低于 `solidcode/craigslist-scraper` 的 GOLD $1.30/1,000。竞品提供额外联系人或过滤字段；本 Actor 的范围聚焦公开搜索数据，并可选加入详情文本、图片和日期。Store 价格可能变化，请在比较前查看各 Actor 当前页面。

请求直接发送到公开 Craigslist 页面。本 Actor 不使用按流量收费的代理或付费数据 API。运行诊断会记录直接响应字节数，但这不是代理账单字节数。

### 限制与数据说明

- 只读取公开搜索结果页和这些结果直接链接到的公开详情页。
- URL 必须使用 HTTPS、`craigslist.org` 域名和 `/search/` 搜索路径。
- 每次运行最多 10 个搜索 URL、每个 URL 最多 5 页、总计最多 100 条唯一结果。
- 搜索期间帖子可能发生变化。详情页抓取前帖子若已删除，搜索结果行仍可能保留，而详情字段为空。
- 每次运行最多抓取 25 个详情页。超过 25 条的其他记录仍可能保留搜索页字段，且 `detailsIncluded` 为 `false`。
- 如果 Craigslist 搜索卡片没有显示价格或地点，输出不会猜测该值。
- 原帖或图片被删除后，图片链接可能失效。
- Actor 不保证帖子仍有效、准确、安全或得到 Craigslist 认可。
- 遇到访问挑战时，Actor 会失败，不会把空数据集报告为成功。明确被拦截时请停止重试。

### 使用建议

- 先在 Craigslist 自己的搜索页面选择地区和分类，再复制链接，避免手工拼错路径。
- 从一个 URL 和较小的 `maxItems` 开始。先确认地区、分类和搜索词正确，再提高上限。
- 比较多个城市时使用相同查询词。`sourceArea` 会标明每条记录来自哪个区域。
- 只在需要详细文字和图片时打开 `includeDetails`。它最多额外读取 25 个公开详情页，会增加运行时间和传输字节数。
- 使用 `url` 回到原帖；使用 `id` 在定时运行间去重。
- 如果要追踪市场变化，请保存带日期的数据集副本。Craigslist 帖子可能被修改或撤下。
- 大范围研究可提交多个较窄的 Craigslist 搜索 URL，不要把互不相关的查询拼进一个 URL。
- 快速检查使用 `maxPages: 1`。只有第一页不足以覆盖目标结果时再提高页数。
- 需要全部字段时导出 `Full JSON`；快速查看时使用更紧凑的 `Listings` 表格。

### API 与集成

可从 Apify Console、API、定时任务、Webhook 或能启动 Apify Actor 并读取默认数据集的集成运行。

同步启动并返回运行对象：

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~craigslist-scraper/run-sync" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchUrls":["https://sfbay.craigslist.org/search/sss?query=desk"],"maxItems":10,"maxPages":1,"includeDetails":false}'
```

异步启动运行：

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~craigslist-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchUrls":["https://newyork.craigslist.org/search/sss?query=chair"],"maxItems":20,"includeDetails":true}'
```

运行完成后读取默认数据集：

```bash
curl "https://api.apify.com/v2/datasets/$DATASET_ID/items?clean=true&format=json" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

紧凑表格可请求 `?view=overview`。完整记录可使用默认 `/items` 接口或 `full` 视图。把 `$APIFY_TOKEN` 和 `$DATASET_ID` 替换为你自己的值，不要把密钥放进公开任务输入或共享日志。

### 常见问题

#### 可以只输入关键词吗？

不可以。请提交已经包含地区、分类和关键词的 Craigslist 搜索结果 URL。Actor 读取这个结果页，不会替你执行新的站内搜索。

#### Actor 会收集邮箱或电话号码吗？

不会返回独立的联系方式字段。Actor 聚焦公开列表数据，描述文本中的常见邮箱和电话号码格式会被屏蔽。不过公开帖子文本各不相同，请根据自己的合规要求检查输出。

#### 为什么 `price` 是 null？

部分分类或帖子不会在搜索卡片上显示价格。Actor 不会从标题推断或编造价格。

#### 为什么 `description` 是 null？

默认关闭详情抓取。把 `includeDetails` 设为 `true`。帖子可能已经被删除，或者页面没有可读描述。

#### 为什么运行失败且没有数据行？

空结果按失败处理。Actor 也会在访问挑战时停止，而不是返回一个容易误解的空成功数据集。零结果失败不会写入数据行。

#### Actor 会遍历 Craigslist 的所有城市吗？

不会自动列出所有城市。每次运行最多接收 10 个地区搜索 URL，请提交需要的确切区域链接。

#### 最多抓多少详情页？

每次运行最多 25 个。如果 `maxItems` 大于 25，Actor 仍可返回更多搜索结果，但只有前 25 条尝试读取详情字段。

#### 结果会一直在线吗？

不会。帖子可能被编辑、删除、过期或在抓取后被限制访问。如需追踪，请保留结果 URL 和帖子 ID。

#### 可以导出 CSV 或 Excel 吗？

可以。在 Apify 数据集页面导出 CSV、Excel、JSON 或其他支持的格式。字段为扁平结构，便于筛选。

### 其他市场数据工具

- [Amazon Product Scraper](https://apify.com/myagizm/amazon-product-scraper)：公开商品搜索数据。
- [Zillow Scraper](https://apify.com/myagizm/zillow-scraper)：房产搜索结果。
- [Google Maps Scraper](https://apify.com/myagizm/google-maps-scraper)：本地商家列表。
- [Website Content Crawler](https://apify.com/myagizm/website-content-crawler)：公开网页内容。
- 查看 [myagizm Actor 主页](https://apify.com/myagizm) 了解其他数据工具。

### 相关搜索

Craigslist 抓取器 · Craigslist 搜索结果抓取 · Craigslist 列表数据提取 · Craigslist 家具搜索抓取 · Craigslist 工作搜索抓取 · Craigslist 房屋搜索抓取 · Craigslist 出售商品抓取 · Craigslist 分类市场数据 · Craigslist 二手商品价格监控 · Craigslist 本地市场研究 · Craigslist 帖子链接提取 · Craigslist 城市搜索抓取 · Craigslist 分类搜索抓取 · Craigslist 搜索 CSV 导出 · Craigslist 地区列表数据 · Craigslist 商品价格比较 · Craigslist 二手库存研究 · Craigslist 服务列表搜索 · Craigslist 零工搜索数据 · Craigslist 职位列表导出 · Craigslist 房产搜索结果 · Craigslist 图片链接提取 · Craigslist 发布时间提取 · Craigslist 公寓搜索导出 · Craigslist 车辆搜索结果 · Craigslist 家居商品监控 · Craigslist 多地区查询 · Craigslist 公开帖子数据 · Craigslist 搜索 URL 抓取

### 免责声明

这是独立的数据采集工具，与 Craigslist 或其关联方无隶属、背书或赞助关系。Actor 读取公开可访问的搜索页和帖子详情页。你有责任遵守 Craigslist 条款、适用的隐私规则以及当地法律。请勿用输出骚扰个人、歧视他人，或在未经核验的情况下作出需要准确数据的决定。

### 资源

- [Apify Actor 文档](https://docs.apify.com/platform/actors)
- [Apify API 参考](https://docs.apify.com/api/v2)
- [Apify 数据集导出](https://docs.apify.com/platform/storage/dataset)
- [Apify 定时任务](https://docs.apify.com/platform/schedules)
- [Apify 集成](https://docs.apify.com/platform/integrations)
- [Apify Store 主页](https://apify.com/myagizm)

### Errors & billing

Input errors finish with status SUCCEEDED, no results and no charge; see the OUTPUT record for the reason.

#### 错误与计费

输入错误会以 SUCCEEDED 状态结束，不产生结果且不收费；原因请查看 OUTPUT 记录。

# Actor input Schema

## `searchUrls` (type: `array`):

Paste one or more public Craigslist search-result URLs, such as a city and category search. URLs must use HTTPS and a craigslist.org host. Up to 10 URLs are accepted.

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

Maximum number of unique listings to return across all supplied URLs. The actor caps each run at 100 records.

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

Maximum number of Craigslist result pages to inspect for each URL. Each page can contain up to 120 listings; the global maximum is still maxItems.

## `includeDetails` (type: `boolean`):

When enabled, also fetch descriptions, public listing images and posting dates for up to the first 25 results. Contact email addresses and phone numbers are not extracted.

## Actor input object example

```json
{
  "searchUrls": [
    "https://sfbay.craigslist.org/search/sss?query=desk"
  ],
  "maxItems": 3,
  "maxPages": 1,
  "includeDetails": false
}
```

# Actor output Schema

## `listings` (type: `string`):

Search-result listings in the table view.

## `fullJson` (type: `string`):

All listing fields as JSON.

# 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 = {
    "searchUrls": [
        "https://sfbay.craigslist.org/search/sss?query=desk"
    ],
    "maxItems": 3,
    "maxPages": 1,
    "includeDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("myagizm/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 = {
    "searchUrls": ["https://sfbay.craigslist.org/search/sss?query=desk"],
    "maxItems": 3,
    "maxPages": 1,
    "includeDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("myagizm/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 '{
  "searchUrls": [
    "https://sfbay.craigslist.org/search/sss?query=desk"
  ],
  "maxItems": 3,
  "maxPages": 1,
  "includeDetails": false
}' |
apify call myagizm/craigslist-scraper --silent --output-dataset

```

## MCP server setup

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