Skip to main content

craigslist

Travis CI Status Coverage Status PyPI Version License Status

Python wrapper for craigslist. Requires Python 3.6+.

Install

pip3 install --upgrade craigslist

CLI

$ craigslist
usage: craigslist [-h] {search,list} ...

examples:
craigslist search worcester apa
craigslist search newyork tlg
craigslist search sfbay mis
craigslist search washingtondc apa --postal 20071 --search_distance 1
craigslist search newyork aap --postal 10023 --search_distance 1 --hasPic --availabilityMode within_30_days --limit 100
craigslist search sfbay ccc --postal 94305 --search_distance 1 --limit 10
craigslist search vancouver sss "shoes" --condition new like_new --hasPic --max_price 20 --limit 10
craigslist search washingtondc jjj --is_telecommuting --is_internship
craigslist list areas
craigslist list categories

positional arguments:
  {search,list}
    search       search
    list         list

optional arguments:
  -h, --help     show this help message and exit

For more details, try:

$ craigslist search
$ craigslist list

API

See the examples folder.

simple

import craigslist

for post in craigslist.search('washingtondc', 'apa', postal=20071, search_distance=1):
    print(post)

# craiglist posts expire. replace the url below with something current
post = craigslist.get('https://washingtondc.craigslist.org/nva/apa/5875729002.html')

async

import asyncio
import craigslist

async def main():
    async for post in craigslist.search_async('washingtondc', 'apa', postal=20071, search_distance=1):
        print(post)

    # craiglist posts expire. replace the url below with something current
    post = await craigslist.get_async('https://washingtondc.craigslist.org/nva/apa/5875729002.html')

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

Development

Setup

make install

Test

make test

Disclaimer

  • This library is not associated with Craigslist.

  • Please read the Craigslist terms of use.

Metadata

Release files for craigslist 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for craigslist 0.1.10
File Size Uploaded Provenance
craigslist-0.1.10.tar.gz 53.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for craigslist 0.1.10
File Interpreter ABI Platform
craigslist-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 109.6 kB

Release files / craigslist-0.1.10.tar.gz

Download URL craigslist-0.1.10.tar.gz
Size 53.1 kB
Tags Source
SHA-256 checksum
How to use checksums
97860ac91febd3e235f2dfc8cbb84f66fa916763a3dfd08c64595bc66d4711a9
BLAKE2b-256 checksum
How to use checksums
1f56528c37fa53b3b706ed50024b1ca8d92df9b3aecf88513baa0fda0ad1b3b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release files / craigslist-0.1.10-py3-none-any.whl

Download URL craigslist-0.1.10-py3-none-any.whl
Size 56.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a91b734146f7511c561b69926df9e3266f769bb0cc003374424165ab8b35ef5
BLAKE2b-256 checksum
How to use checksums
05951e5b5c0829673c6e030f2ee7fad7da152565a8adf660130e08d0019fdb81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Security for craigslist 0.1.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page