Skip to main content
This tutorial shows you how to send a search prompt to ChatGPT and get structured JSON data using the Bright Data ChatGPT Scraper API.

Prerequisites

1

Get your API token

Go to the user settings page in your Bright Data account and copy your API token.If you don’t have an account yet, sign up at brightdata.com. New users get $2 free credit for testing.
Your API token is shown only once when created. Copy and store it securely.
2

Send a request

We’ll use the ChatGPT Search endpoint with a synchronous request. Replace YOUR_API_TOKEN with your actual token:
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York"}]'
You should see a 200 status code. This takes 15-45 seconds.
3

Review the response

The Bright Data ChatGPT Scraper API returns a JSON array with structured search data:
[
  {
    "url": "https://chatgpt.com/",
    "prompt": "Top hotels in New York",
    "answer_text": "Here are some of the top-rated hotels in New York City...",
    "model": "gpt-4o",
    "web_search_triggered": true,
    "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"
      }
    ],
    "prompt_sent_at": "2026-04-08T12:00:00.000Z"
  }
]
Each result object includes the answer text, citations with source URLs, and metadata. See the full response schema.
You’ve successfully searched ChatGPT with your first prompt using the Bright Data ChatGPT Scraper API.

Common questions

Yes. Add more objects to the input array. Synchronous requests support up to 20 inputs. For larger batches, use the async /trigger endpoint.
[
  {"url": "https://chatgpt.com/", "prompt": "Top hotels in New York"},
  {"url": "https://chatgpt.com/", "prompt": "Best restaurants in Paris"},
  {"url": "https://chatgpt.com/", "prompt": "Things to do in Tokyo"}
]
Verify your API token is correct and hasn’t expired. Generate a new token from Account settings. See the authentication guide for details.
Synchronous requests have a 1-minute timeout. If the request exceeds this limit, it automatically switches to async and returns a snapshot_id. Use the async workflow for large batches.
Verify that the url field is set to https://chatgpt.com/ and the prompt field is not empty. Prompts must be 4,096 characters or fewer.

Next steps

Send your first request

Explore input options with full code examples.

Async batch requests

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

Set up webhooks

Receive results automatically when scraping completes.