<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Talowire</title>
    <description>The latest articles on DEV Community by Talowire (@talowire).</description>
    <link>https://dev.to/talowire</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4258985%2F764a6d7d-b1a0-48b5-8096-22af6f3f596f.png</url>
      <title>DEV Community: Talowire</title>
      <link>https://dev.to/talowire</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/talowire"/>
    <language>en</language>
    <item>
      <title>Craigslist has no API — here's how to get listings as JSON (and alerts for new ones)</title>
      <dc:creator>Talowire</dc:creator>
      <pubDate>Tue, 24 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/talowire/craigslist-has-no-api-heres-how-to-get-listings-as-json-and-alerts-for-new-ones-1k3j</link>
      <guid>https://dev.to/talowire/craigslist-has-no-api-heres-how-to-get-listings-as-json-and-alerts-for-new-ones-1k3j</guid>
      <description>&lt;p&gt;Craigslist is still where a lot of apartments, used cars and local gigs show up first. But if you want those listings in a script, a spreadsheet or a Slack channel, you hit a wall quickly: &lt;strong&gt;Craigslist has no public API for reading listings.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This post shows how to get any Craigslist search as clean JSON with one HTTP call, and, more interestingly, how to turn it into an &lt;strong&gt;alert pipeline that only ever gives you new listings&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclosure: I built the Apify Actor used below (&lt;a href="https://apify.com/talowire/craigslist-monitor" rel="noopener noreferrer"&gt;Craigslist API &amp;amp; Monitor&lt;/a&gt;). The monitoring pattern in the second half applies to any scraper, whatever tool you use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. A Craigslist search as JSON, in one call
&lt;/h2&gt;

&lt;p&gt;Do your search on Craigslist as usual (city, category, price, keywords…), copy the URL from the address bar, and send it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;APIFY_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_token   &lt;span class="c"&gt;# https://console.apify.com/settings/integrations&lt;/span&gt;

curl -s -X POST &lt;span class="s2"&gt;"https://api.apify.com/v2/acts/talowire~craigslist-monitor/run-sync-get-dataset-items?token=$APIFY_TOKEN"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"searchUrls": ["https://sfbay.craigslist.org/search/apa?min_price=2000&amp;amp;max_price=3000"], "maxItems": 20}'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq &lt;span class="s1"&gt;'.[] | {price, title, location, url}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each listing comes back as a flat object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"7998579105"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.craigslist.org/view/d/hayward-dry-sauna-gated-community/gawRGmfgo22wKejrh7TXik"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Dry sauna, Gated community, Flexible lease terms"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2489&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"USD"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"postedAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-20T22:05:41+00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"city"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"sfbay"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"location"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"hayward / castro valley"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"latitude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;37.6374&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"longitude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;-122.067&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"bedrooms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"sqft"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;717&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"images"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"https://images.craigslist.org/00I0I_bVFnw1FSJKi_0wg0jm_600x450.jpg"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every filter in the URL is respected, so the URL &lt;em&gt;is&lt;/em&gt; your query. Cars come with &lt;code&gt;odometer&lt;/code&gt;, jobs with &lt;code&gt;company&lt;/code&gt; and &lt;code&gt;salary&lt;/code&gt;, and an &lt;code&gt;includeDetails&lt;/code&gt; option adds the description, attributes and street address.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The hard part: "only new listings"
&lt;/h2&gt;

&lt;p&gt;Fetching a search once is easy. Running it every 30 minutes and getting &lt;strong&gt;only what's new&lt;/strong&gt; is where most scrapers (and most Craigslist tools I tried) fall apart:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Duplicates.&lt;/strong&gt; Run the same search twice, get the same 120 listings twice. Your Slack channel becomes noise, and if you pay per result, you pay twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The backlog trap.&lt;/strong&gt; The naive fix is "remember the IDs I already returned and skip them". But with a cap of, say, 100 results per run, the &lt;em&gt;next&lt;/em&gt; run happily returns the 100 listings that came after: old ones you never asked for. A busy search can drip-feed you weeks of backlog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Late indexing.&lt;/strong&gt; Listings don't always appear in posting-time order. Something posted 20 minutes ago can show up in the results after something posted 5 minutes ago.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The pattern that works is a &lt;strong&gt;baseline plus a high-water mark&lt;/strong&gt;, stored per search:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First run:&lt;/strong&gt; return the newest N listings, record the newest posting time you saw (the &lt;em&gt;mark&lt;/em&gt;), and record the IDs of everything currently visible near the top. That's the baseline: nothing older will ever be returned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next runs:&lt;/strong&gt; only accept listings posted &lt;strong&gt;after the mark, minus a small grace window&lt;/strong&gt; (an hour) to catch late indexing, and that you have &lt;strong&gt;never seen&lt;/strong&gt; before. Then move the mark forward.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't move the mark if a run was cut short&lt;/strong&gt; (by your item cap or your budget), so the remaining new listings come in the next run instead of being skipped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop early.&lt;/strong&gt; Results are sorted newest first, so once you hit a run of known listings you can stop: a check with nothing new costs a single request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the Actor this is just one input field, &lt;code&gt;stateKey&lt;/code&gt;. Use the same name on every run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;apify_client&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;ApifyClient&lt;/span&gt;   &lt;span class="c1"&gt;# pip install apify-client&lt;/span&gt;

&lt;span class="n"&gt;search&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://newyork.craigslist.org/search/cta?query=toyota&amp;amp;max_auto_miles=80000"&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ApifyClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"APIFY_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;run&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;actor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"talowire/craigslist-monitor"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;run_input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"searchUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"stateKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"toyotas-"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;md5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# stable per search&lt;/span&gt;
    &lt;span class="s2"&gt;"maxItems"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"defaultDatasetId"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;iterate_items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"priceText"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put that in cron and you have a "new Toyotas under 80k miles in NYC" feed. One small gotcha if you build your own key: don't use Python's built-in &lt;code&gt;hash()&lt;/code&gt; for it, since it changes on every interpreter start.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. No code: Craigslist → Slack every 30 minutes
&lt;/h2&gt;

&lt;p&gt;The same thing in n8n is three nodes: &lt;strong&gt;Schedule&lt;/strong&gt; (every 30 min) → &lt;strong&gt;HTTP Request&lt;/strong&gt; (the call above, with a &lt;code&gt;stateKey&lt;/code&gt;) → &lt;strong&gt;HTTP Request&lt;/strong&gt; to a Slack incoming webhook with &lt;code&gt;{{ $json.priceText }} · {{ $json.title }} · {{ $json.url }}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There's an importable workflow in the examples repo: &lt;a href="https://github.com/talowire/talowire-examples" rel="noopener noreferrer"&gt;github.com/talowire/talowire-examples&lt;/a&gt;. Make and Zapier both have Apify integrations that can trigger on a finished run and read its dataset.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it costs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;$1.50 per 1,000 listings delivered&lt;/strong&gt; ($2.00 with full details). Empty runs deliver nothing, so they cost nothing in listings, plus a run start of $0.00005. Checking a search every 30 minutes for a month is about $0.07 in starts.&lt;/li&gt;
&lt;li&gt;New Apify accounts get free monthly credits, enough to try it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limits and etiquette
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Craigslist exposes at most ~10,000 results per search. For bigger areas, split by sub-area or price range.&lt;/li&gt;
&lt;li&gt;Only public listing data, at a moderate rate. You're responsible for how you use it and for respecting Craigslist's terms. Please don't use it to mass-contact people.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;The same monitoring pattern powers a &lt;a href="https://apify.com/talowire/vinted-monitor" rel="noopener noreferrer"&gt;Vinted version&lt;/a&gt; (new items across 23 countries). If you're building alerts for another marketplace, the baseline + high-water-mark approach above is the part worth copying.&lt;br&gt;
s the part worth copying.&lt;/p&gt;

</description>
      <category>api</category>
      <category>python</category>
      <category>automation</category>
      <category>webscraping</category>
    </item>
  </channel>
</rss>
