Send prompts to ChatGPT and reliably extract the response - including the full answer text, any web-search citations, and structured metadata - at scale, without blocks.
Powered by the NetNut LLM Scraper API. NetNut handles the proxy rotation, headless rendering, anti-bot handling, and throttling, so you just send a prompt and get back clean, structured JSON.
- How it works
- Who is this for?
- Getting started
- Request sample
- Request parameters
- Output sample
- Response structure
- Code examples
- Testing
- Use cases
- Why choose NetNut
- FAQ
- Learn more
- You send a
POSTrequest to the NetNut LLM Scraper API endpoint with a prompt and thechatgptengine. - NetNut runs the prompt against ChatGPT using its residential proxy network and rendering infrastructure.
- You receive structured JSON containing the ChatGPT response text and any citations from its web-search results. No HTML parsing required.
Endpoint
POST https://llm-scraper.netnut.io/search
Authentication - HTTP Basic Auth using your NetNut Scraper API credentials:
Authorization: Basic <base64(username:password)>
This API is designed for SEO platforms, AI visibility and GEO tools, agencies, competitive intelligence providers, and enterprises that need to track, analyze, and monitor ChatGPT answers at scale.
-
Get NetNut LLM Scraper API credentials. Start here or contact NetNut.
-
Copy the example environment file and add your own credentials:
cp .env.example .env # then edit .env and set NETNUT_USERNAME / NETNUT_PASSWORDπ Never commit credentials.
.envis git-ignored. All examples read credentials from theNETNUT_USERNAMEandNETNUT_PASSWORDenvironment variables, nothing is hardcoded. -
Pick your language from
examples/and run it (see each example's notes below).
import os, requests
payload = {
"prompt": "What are the top SEO trends in 2026?",
"engine": "chatgpt",
"web_search": True,
"country": "us",
}
response = requests.post(
"https://llm-scraper.netnut.io/search",
auth=(os.environ["NETNUT_USERNAME"], os.environ["NETNUT_PASSWORD"]),
json=payload,
timeout=180,
)
print(response.json())| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | Yes | - | The prompt/question to send to ChatGPT. Max length: 4096 characters. |
engine |
string | No | chatgpt |
The chatbot engine to use. Currently only chatgpt is supported. |
web_search |
boolean | No | false |
Enables ChatGPT's built-in web search so the answer can cite live sources. |
country |
string | No | - | Target country for geo-relevant results (e.g. us, uk, de). |
follow_up_prompt |
string | No | - | A second message sent immediately after the first response, in the same session. |
raw_response |
boolean | No | false |
Returns the raw output from the LLM session in addition to the parsed response. |
{
"timestamp": "2026-06-18T14:28:37.383Z",
"traceID": "ffc880ee-81b1-4d55-904b-22fda6850607",
"request_duration": 32.98,
"process_duration": 32.98,
"scraper": "ChatGPT",
"chatgptAttempts": 1,
"chromeUnblockerAttempts": 0,
"llm_model": "gpt-5.5",
"response": {
"prompt": "What are the top SEO trends in 2026?",
"text_markdown": "The biggest SEO story in 2026 is that SEO is no longer just about ranking web pages. It's increasingly about being cited, summarized, and trusted by AI-powered search systems ...",
"text": "The biggest SEO story in 2026 is that SEO is no longer just about ranking web pages ...",
"model_search_queries": [
"top SEO trends 2026 AI search optimization GEO zero click search 2026",
"SEO trends 2026 AI Overviews Google SEO 2026 predictions"
],
"widgets": [],
"citations_found": true,
"citations": [
{
"id": "1",
"title": "2026 SEO Predictions: AI, LLMs & the Future of Search",
"url": "https://www.searcheseverywhere.com/blog/seo/2026-seo-predictions-ai-llms-future-of-search",
"section": "citations",
"attribution": "searcheseverywhere.com"
}
],
"tables": []
}
}The above is a trimmed, real response. The
text/text_markdownfields contain the full answer. Whenweb_searchis enabled,citationslists the sources ChatGPT consulted (thesectionfield iscitationsfor sources cited inline andmorefor additional related sources).
| Field | Type | Description |
|---|---|---|
timestamp |
string | ISO 8601 timestamp of the response. |
traceID |
string | Unique identifier for the request (useful for support/debugging). |
request_duration |
number | Total request time in seconds. |
process_duration |
number | Processing time in seconds. |
scraper |
string | The scraper used - ChatGPT. |
chatgptAttempts |
number | How many attempts it took to get the answer from ChatGPT. |
chromeUnblockerAttempts |
number | How many unblocker attempts were needed during rendering. |
llm_model |
string | The ChatGPT model that produced the answer (e.g. gpt-5.5). |
response.prompt |
string | The prompt that was sent. |
response.text |
string | The full ChatGPT response as plain text. |
response.text_markdown |
string | The full ChatGPT response in Markdown. |
response.model_search_queries |
array | The web-search queries ChatGPT ran (when web_search is enabled). |
response.widgets |
array | Structured widgets returned in the answer (empty if none). |
response.citations_found |
boolean | Whether ChatGPT attached citations to the answer. |
response.citations |
array | List of citation objects (see below). |
response.tables |
array | Comparison tables extracted from the answer (empty if none). |
Citation object
| Field | Type | Description |
|---|---|---|
id |
string | Citation index (returned as a string, e.g. "1"). |
title |
string | Source title. |
url |
string | Source URL. |
section |
string | citations for inline-cited sources, more for related sources. |
attribution |
string | Short domain/source attribution (e.g. searcheseverywhere.com). |
description |
string | Short description of the source (present on some citations). |
Ready-to-run examples live in examples/. Every example reads credentials from
environment variables and prints the structured JSON response.
| Language | Path | Notes |
|---|---|---|
| Python | examples/python |
Uses requests. |
| Node.js | examples/nodejs |
Uses built-in fetch (Node 18+). |
| Go | examples/go |
Standard library only. |
| PHP | examples/php |
Uses cURL extension. |
| Java | examples/java |
Uses java.net.http (Java 11+). |
| C# | examples/csharp |
.NET 8+. |
| Shell | examples/shell |
curl one-liner. |
Set your credentials first:
# macOS / Linux
export NETNUT_USERNAME="your-username"
export NETNUT_PASSWORD="your-password"# Windows PowerShell
$env:NETNUT_USERNAME = "your-username"
$env:NETNUT_PASSWORD = "your-password"Each language example ships with a unit test file. No live API calls are made during testing.
| Language | Test file | Run command |
|---|---|---|
| Python | examples/python/test_main.py |
python -m pytest test_main.py -v |
| Node.js | examples/nodejs/test.js |
npm test or node --test test.js |
| Go | examples/go/main_test.go |
go test ./... |
| PHP | examples/php/test_main.php |
php test_main.php |
| Java | examples/java/MainTest.java |
java MainTest.java |
| Shell | examples/shell/test.sh |
bash test.sh |
- AI search visibility (GEO/AEO). Track whether and how your brand appears in ChatGPT answers.
- Citation/source monitoring. See which domains ChatGPT cites for the prompts that matter to you.
- Competitive intelligence. Compare how ChatGPT describes you vs. competitors across countries.
- Content optimization. Learn what ChatGPT surfaces so you can optimize content to be cited.
- Datasets & research. Collect ChatGPT responses at scale for analysis or model evaluation.
- Reliable extraction at scale - proxy rotation, rendering, and anti-bot handling are built in.
- Structured JSON output - answer text + citations, no HTML scraping.
- Web search support - capture the live sources ChatGPT cites.
- Geo-targeting - get country-specific ChatGPT results.
- Backed by a large residential proxy network.
What does this API do? It sends your prompt to ChatGPT and returns the response as structured JSON, including the answer text and any citations from ChatGPT's web search.
Do I need my own credentials? Yes. This repository contains no credentials. Bring your own NetNut LLM Scraper API credentials and set them as environment variables.
Is there a prompt length limit? Yes, prompts can be up to 4096 characters.
Can I enable web search?
Yes, pass web_search: true to let ChatGPT search the web and cite live sources.
Can I target a specific country?
Yes, pass country (e.g. us, uk, de).
What format is returned? Always structured JSON, never HTML.
Questions or need higher volume? Contact NetNut.
This project is licensed under the MIT License.
