How oxylabs/chatgpt-scraper works
1. What this repository is
- This is a sample/integration repository for Oxylabs’ ChatGPT Scraper, not an application or backend service.
- Its purpose is to show how different clients can call a single external scraping API and consume the returned JSON.
2. Primary external dependency
- The core architectural boundary is the Oxylabs Web Scraper API endpoint at https://realtime.oxylabs.io/v1/queries.
- All examples authenticate with API credentials and send a request there; the repository itself does not host scraping logic, proxy management, or browser automation.
3. Client-facing entry points
- The Code examples/ folder contains equivalent request examples in multiple languages: C#, curl, Go, HTTP, Java, JSON, Node.js, PHP, and Python.
- These files represent alternative client adapters around the same API contract rather than separate subsystems.
4. Request construction flow
- Each example builds a POST payload with the same key fields: source: chatgpt, prompt, parse, search, and optional geo_location or callback_url.
- The prompt is the main user input; the other fields control how the external API executes and parses the ChatGPT session.
5. Authentication and transport
- Authentication is done via username/password credentials passed with the request.
- The interaction is direct HTTP over TLS, so the repo’s integration boundary is a standard request/response API call.
6. Execution model
- The default usage shown in the README is synchronous: send a POST request and immediately read the JSON response.
- The presence of callback_url indicates the API can also support asynchronous completion, but that is still managed by the external service, not this repo.
7. Response shape and parsing
- The repository includes an output-chatgpt-scraper.json sample showing the API’s returned structure.
- The payload contains a top-level results array with metadata such as job timing, status codes, parser type, and the scraped content object.
8. Content layer returned by the API
- The content object is the important data product: it includes the submitted prompt, model identifier, plain text response, Markdown response, structured Markdown JSON, and parse status.
- Conditional fields such as citations, search queries, links, shopping products, and ads appear only when the ChatGPT response contains them.
9. Operational features exposed through the API
- The README highlights built-in scraping infrastructure handled upstream: JS rendering, geo-targeting, anti-bot handling, CAPTCHA bypass, and proxy rotation.
- These are architectural capabilities of the external service, which means the repository acts as a thin consumer rather than an operator of scraping infrastructure.
10. Repository composition for diagrams
- For an architecture diagram, this repo should be shown as a documentation-and-samples layer containing multiple language clients on one side and the Oxylabs ChatGPT Scraper API on the other.
- The only meaningful data flow is: user prompt and credentials in, API request to Oxylabs, parsed JSON response back, with the sample output file illustrating the downstream contract.
Main entry points: README.md README · curl-chatgpt-scraper.sh curl · python-chatgpt-scraper.py Python · nodejs-chatgpt-scraper.js Node.js
Components 14
Code examples
Multi-language request examples and sample output
- README · Usage overview and integration guide
README.md - Sample output · Example JSON returned by the API
output-chatgpt-scraper.json - curl · Command-line request adapter
Code examples/curl-chatgpt-scraper.sh - Python · Python request adapter
Code examples/python-chatgpt-scraper.py - Node.js · Node.js request adapter
Code examples/nodejs-chatgpt-scraper.js - Go · Go request adapter
Code examples/golang-chatgpt-scraper.go - Java · Java request adapter
Code examples/java-chatgpt-scraper.java - C# · C# request adapter
Code examples/csharp-chatgpt-scraper.cs - PHP · PHP request adapter
Code examples/php-chatgpt-scraper.php - HTTP · Raw HTTP request example
Code examples/http-chatgpt-scraper.http - JSON · JSON request example
Code examples/json-chatgpt-scraper.json
Oxylabs API
External scraping service boundary
- ChatGPT Scraper API · Oxylabs Web Scraper endpoint handling scraping, parsing, and delivery
Other components
- Request shape · Shared ChatGPT scraper POST fields
- Auth + HTTPS · Basic credentials over direct TLS request/response
Connections 26
- README → curl: shows · Documentation points to language-specific usage examples
- README → Python: shows · Documentation points to language-specific usage examples
- README → Node.js: shows · Documentation points to language-specific usage examples
- README → Go: shows · Documentation points to language-specific usage examples
- README → Java: shows · Documentation points to language-specific usage examples
- README → Sample output: documents · README explains the response contract via the sample payload
- curl → Request shape: builds · Each client constructs the same POST payload
- Python → Request shape: builds · Each client constructs the same POST payload
- Node.js → Request shape: builds · Each client constructs the same POST payload
- Go → Request shape: builds · Each client constructs the same POST payload
- Java → Request shape: builds · Each client constructs the same POST payload
- C# → Request shape: builds · Each client constructs the same POST payload
- PHP → Request shape: builds · Each client constructs the same POST payload
- HTTP → Request shape: builds · Each client constructs the same POST payload
- JSON → Request shape: illustrates · Static request example for the same API contract
- curl → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- Python → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- Node.js → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- Go → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- Java → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- C# → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- PHP → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- HTTP → Auth + HTTPS: uses · Examples authenticate with basic credentials over HTTPS
- Request shape → ChatGPT Scraper API: sent to · POST request is delivered to the external scraping endpoint
- Auth + HTTPS → ChatGPT Scraper API: transports · Direct TLS request/response boundary to Oxylabs
- ChatGPT Scraper API → Sample output: returns · Sample JSON shows the returned results and content structure