Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt

Use this file to discover all available pages before exploring further.

This tutorial walks you through sending synchronous requests to the Bright Data ChatGPT Scraper API. By the end, you’ll have working examples for basic search, country-targeted search, and follow-up prompts.

Prerequisites

Request structure

Every synchronous request follows the same pattern:
POST https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

[{"url": "https://chatgpt.com/", "prompt": "Your search prompt here"}]
The url field is always https://chatgpt.com/. The prompt field contains your search query.
Synchronous requests support up to 20 inputs and have a 1-minute timeout. If the request takes longer, the API automatically returns a snapshot_id instead. See async requests.
Dataset ID: gd_m7aof0k82r803d5bjm Send a prompt and get a structured answer with citations:
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York"}]'
You should see a 200 response. This takes 15-45 seconds.
[
  {
    "url": "https://chatgpt.com/",
    "prompt": "Top hotels in New York",
    "answer_text": "Here are some of the top-rated hotels in New York City...",
    "answer_text_markdown": "Here are some of the top-rated hotels in **New York City**...",
    "model": "gpt-4o",
    "web_search_triggered": true,
    "is_map": false,
    "shopping_visible": false,
    "citations": [
      {
        "title": "Best Hotels in NYC - Travel Guide",
        "url": "https://example.com/nyc-hotels",
        "position": 1
      }
    ],
    "search_sources": [
      {
        "url": "https://example.com/nyc-hotels",
        "title": "Best Hotels in NYC - Travel Guide"
      }
    ],
    "links_attached": [
      {
        "url": "https://example.com/nyc-hotels",
        "text": "Travel Guide"
      }
    ],
    "recommendations": [],
    "references": [],
    "prompt_sent_at": "2026-04-08T12:00:00.000Z"
  }
]

Search with country targeting

Use the country field to get location-specific results:
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://chatgpt.com/", "prompt": "Best local restaurants", "country": "JP"}]'
[
  {
    "url": "https://chatgpt.com/",
    "prompt": "Best local restaurants",
    "answer_text": "Here are some highly recommended local restaurants in Japan...",
    "model": "gpt-4o",
    "web_search_triggered": true,
    "is_map": true,
    "citations": [
      {
        "title": "Top Restaurants in Tokyo",
        "url": "https://example.com/tokyo-restaurants",
        "position": 1
      }
    ],
    "prompt_sent_at": "2026-04-08T12:05:00.000Z"
  }
]

Search with follow-up prompt

Use the additional_prompt field to ask a follow-up question in the same session:
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York", "additional_prompt": "Which of these are pet-friendly?"}]'
[
  {
    "url": "https://chatgpt.com/",
    "prompt": "Top hotels in New York",
    "answer_text": "Here are some of the top-rated hotels in New York City...",
    "additional_answer_text": "Among the hotels listed, the following are pet-friendly...",
    "model": "gpt-4o",
    "web_search_triggered": true,
    "citations": [
      {
        "title": "Pet-Friendly Hotels NYC",
        "url": "https://example.com/pet-friendly-nyc",
        "position": 1
      }
    ],
    "prompt_sent_at": "2026-04-08T12:10:00.000Z"
  }
]
Full ChatGPT Search response schema

Quick reference: dataset ID

EndpointDataset IDInput
ChatGPT Searchgd_m7aof0k82r803d5bjmurl + prompt

Input fields

FieldRequiredDescription
urlYesAlways https://chatgpt.com/
promptYesSearch prompt (max 4,096 characters)
countryNoCountry code for location-targeted results
indexNoUnique tracking ID (number)
require_sourcesNoReturn error if no sources found (boolean)
additional_promptNoFollow-up prompt within the same session
web_searchNoEnable or disable web search during the run (default: true). This is a permission, not a guarantee: read web_search_triggered in the response to know whether a search actually ran. See Query fan-out and web search control

Output fields (web search signals)

FieldTypeAlways returnedMeaning
web_searchbooleanNoEchoes the input value (defaults to true if omitted). Does not indicate whether a search actually happened.
web_search_triggeredbooleanYestrue only if the model actually triggered a web search during the run; false otherwise.
Do not use prompt-derived output fields like is_map, citations, or shopping_visible as proof that a web search ran. Those fields depend on the prompt and the model’s response format. Use web_search_triggered as the canonical signal. Full rules in Query fan-out and web search control.

Output formats

Control the response format with the format query parameter:
ValueDescription
jsonJSON array (default)
ndjsonNewline-delimited JSON, one record per line
csvComma-separated values

Next steps

Async batch requests

Search ChatGPT with hundreds of prompts in a single batch job.

API reference

Full parameter and response field reference.