Craigslist Scraper avatar

Craigslist Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Craigslist Scraper

Craigslist Scraper

Scrapes Craigslist search results via HTML parsing with stealth browser.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Leonard Parisi

Leonard Parisi

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Share

Craigslist Scraper (Apify Actor)

Custom Apify actor that scrapes Craigslist search results via HTML parsing in a stealth browser. Extracts listing title, price, location, post date, image, and direct URL from any Craigslist search page.

How it works

Uses PlaywrightCrawler (Crawlee) with Apify residential proxies (RESIDENTIAL, US). Navigates to the provided search URL, waits for li.cl-static-search-result elements in the DOM, and extracts listing data via page.$$eval. Images and fonts are blocked to reduce proxy bandwidth.

Input

{
"startUrls": [
{ "url": "https://sfbay.craigslist.org/search/sss?query=bike&postal=94102&search_distance=25" }
],
"resultsLimit": 20
}
FieldTypeDefaultMax
startUrlsarray of { url }required
resultsLimitinteger20120

Any Craigslist search URL works: use the postal and search_distance query params to scope by zip code and radius. The sss category searches all for-sale listings.

Output

Each run pushes an array of objects to the Apify dataset:

{
"searchUrl": "https://sfbay.craigslist.org/search/sss?query=bike&postal=94102&search_distance=25",
"listingId": "7925863090",
"title": "Trek Road Bike",
"url": "https://sfbay.craigslist.org/sfc/bik/d/san-francisco-trek-road-bike/7925863090.html",
"price": "$350",
"location": "mission district",
"postedAt": "2024-01-15T10:30:00-0800",
"imageUrl": "https://images.craigslist.org/00L0L_xxxxx.jpg"
}

price, location, postedAt, and imageUrl are null when not present on the listing card.

If no listings are collected, a debug HTML snapshot is saved to the actor key-value store.

Development

npm install # install deps + generate package-lock.json (commit this)
npm run build # tsc → dist/

Deployment

apify-cli is a local dev dependency — no global install needed.

# First time only
./node_modules/.bin/apify login
# Build + push in one step
npm run deploy

After pushing, copy the actor ID from the Apify console (your-username~craigslist-scraper) and update ACTOR_ID in apps/api/src/adapters/craigslist.ts.

Infrastructure

  • Base image: apify/actor-node-playwright-chrome pinned to digest in Dockerfile
  • Proxies: Apify residential pool, US only — requires an Apify plan with residential proxy access
  • Memory: 1024 MB minimum (Playwright + Chrome)
  • Runtime: Node 20, ESM ("type": "module")