A tool to get notifications for new Craigslist postings
Node 7.6+
for async/await functionality
- Clone the master branch of the repo
- Update
config.js
with a Slack webhook - Modify search object as desired
- Run
node search.js
to be notified of new items
See this documentation by Slack for a helpful guide on webhooks. Once you add one to a channel and copy the webhook URL, paste that into config.js
and you're set!
A search object has the following attributes:
city
: The site to search, see here for options, then extract from[city].craigslist.org
.category
: The category to search in for sale postings, extracted from[city].craigslist.org/search/[category]
. See constants.js for some readable mappings.parameters
: An object that contains the search options that can be encoded into a query parameter, with support for the following options:query
: A string indicating the searchsearchTitle
: A boolean indicating to only search titleshasImage
: A boolean indicating that the listing must have an imagepostedToday
: A boolean indicating that the listing must have been posted todaydistance
: A string indicating the search radius fromzipCode
zipCode
: A string indicating the zip code to search inminPrice
: A string indicating the minimum pricemaxPrice
: A string indicating the maximum price
- The
refreshRate
in constants.js indicates how often (in seconds) the search will be polled for new items. - The
cache
in constants.js indicates the number of posting IDs to save, in order to prevent previously seen postings that were updated from sending another notification.