Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

craiglist-scraper-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

craiglist-scraper-api

eBay Scraper for extracting product titles, descriptions, prices, specifications, customer reviews, and ratings from eBay

  • 1.0.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

Craigslist Scraper

Oxylabs promo code

Craigslist Scraper is a scraping tool that overcomes advanced anti-bot systems and helps you gather public data from Craigslist on any scale you need. This guide will show you how to scrape Craigslist using Oxylabs’ Scraper API.

How it works

You can get Craigslist data by sending a request to our API with the URLs you want to access and scrape. The API will return the HTML of any public Craigslist page.

Python code example

The below code sample sends a request to our service, which uses a headless browser to execute JavaScript and sends back the HTML of a Craigslist page:

import requests
from pprint import pprint

# Structure payload.
payload = {
   'source': 'universal',
   'url': 'https://berlin.craigslist.org/search/ela#search=1~gallery~0~0',
   'geo_location': 'Germany',
   'render': 'html'
}

# Get a response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'), #Your credentials go here
    json=payload
)

# Instead of response with job status and results URL, this will return the
# JSON response with results.
pprint(response.json())

Visit the documentation to find more payload parameters and other details.

Output sample

{
  "results": [
    {
      "content": "<!doctype html>
<html lang="en">
<head>
      ...
      </script></body>
</html>
",
      "created_at": "2023-09-21 14:26:52",
      "updated_at": "2023-09-21 14:27:10",
      "page": 1,
      "url": "https://berlin.craigslist.org/search/ela#search=1~gallery~0~0",
      "job_id": "7110630468831163393",
      "status_code": 200
    }
  ]
}

Oxylabs Craigslist Scraper API will ease your scraping processes significantly. Use it to gather public data, such as jobs, items, services, and ads. If you have any questions, feel free to get in touch with us via live chat or email.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc