curl --request POST \
--url 'https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&include_errors=true' \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"input": [{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York", "country": "us", "web_search": true}, {"url": "https://chatgpt.com/", "prompt": "What are the biggest business trends to watch in the next five years?"}]}'[
{
"url": "https://chatgpt.com/?q=Top%20hotels%20in%20New%20York",
"prompt": "Top hotels in New York",
"answer_text": "Here are some of the top-rated hotels in New York City...",
"answer_text_markdown": "## Top Hotels in New York City\n\n1. **The Plaza** - Iconic luxury...",
"answer_html": "<div>...</div>",
"model": "gpt-4o",
"web_search_triggered": true,
"citations": [
{
"title": "Best Hotels in NYC 2024",
"url": "https://www.travelandleisure.com/best-hotels-nyc",
"position": 1
}
],
"search_sources": [
{
"url": "https://www.travelandleisure.com/best-hotels-nyc",
"title": "Best Hotels in NYC",
"favicon": "https://www.travelandleisure.com/favicon.ico"
}
],
"links_attached": [
{
"url": "https://www.theplazany.com",
"text": "The Plaza",
"position": 0
}
],
"recommendations": [],
"references": [],
"country": "us",
"is_map": true,
"shopping_visible": false,
"prompt_sent_at": "2024-12-15T10:30:00.000Z",
"index": null
}
]
AI Search APIs
Search by prompt
Use the Bright Data AI Search API to search by Prompt. POST /datasets/v3/scrape triggers a job that returns structured AI search results as JSON.
POST
/
datasets
/
v3
/
scrape
curl --request POST \
--url 'https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&include_errors=true' \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"input": [{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York", "country": "us", "web_search": true}, {"url": "https://chatgpt.com/", "prompt": "What are the biggest business trends to watch in the next five years?"}]}'[
{
"url": "https://chatgpt.com/?q=Top%20hotels%20in%20New%20York",
"prompt": "Top hotels in New York",
"answer_text": "Here are some of the top-rated hotels in New York City...",
"answer_text_markdown": "## Top Hotels in New York City\n\n1. **The Plaza** - Iconic luxury...",
"answer_html": "<div>...</div>",
"model": "gpt-4o",
"web_search_triggered": true,
"citations": [
{
"title": "Best Hotels in NYC 2024",
"url": "https://www.travelandleisure.com/best-hotels-nyc",
"position": 1
}
],
"search_sources": [
{
"url": "https://www.travelandleisure.com/best-hotels-nyc",
"title": "Best Hotels in NYC",
"favicon": "https://www.travelandleisure.com/favicon.ico"
}
],
"links_attached": [
{
"url": "https://www.theplazany.com",
"text": "The Plaza",
"position": 0
}
],
"recommendations": [],
"references": [],
"country": "us",
"is_map": true,
"shopping_visible": false,
"prompt_sent_at": "2024-12-15T10:30:00.000Z",
"index": null
}
]
Query Parameters
string
default:"gd_m7aof0k82r803d5bjm"
required
The dataset ID used for this request.
Must be set to
gd_m7aof0k82r803d5bjm to collect ChatGPT Search - Search by Prompt data.boolean
default:false
Whether to send notifications when the request is completed.
boolean
default:true
Whether to include errors in the response.
Request Body
object[]
required
An array of input objects.
Show properties
Show properties
string
required
The ChatGPT page URL. Must be set to
https://chatgpt.com/.string
required
The search prompt. Each prompt triggers a separate ChatGPT search query. Maximum 4,096 characters.
string
Country from which to perform the search.
number
Unique ID for tracking each crawl request.
boolean
If set to
true and sources are not found in the page, an error message is returned instead of the record.string
A follow-up input sent after receiving the first answer, aiming to clarify, expand, or refine the initial response. The result is returned as
additional_answer_text.boolean
default:true
Permission to run an external web search during the run. If set to
true (default), the Web Search button is enabled and the model may click it. If false, the button is never clicked and the model will not trigger a web search. This field is a permission, not a guarantee: setting true does not mean a search will happen. Read web_search_triggered in the response to know whether a search actually ran. See Query fan-out and web search control.Example
{
"input": [
{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York", "country": "us", "web_search": true},
{"url": "https://chatgpt.com/", "prompt": "What are the biggest business trends to watch in the next five years?"}
]
}
[
{
"url": "https://chatgpt.com/?q=Top%20hotels%20in%20New%20York",
"prompt": "Top hotels in New York",
"answer_text": "Here are some of the top-rated hotels in New York City...",
"answer_text_markdown": "## Top Hotels in New York City\n\n1. **The Plaza** - Iconic luxury...",
"answer_html": "<div>...</div>",
"model": "gpt-4o",
"web_search_triggered": true,
"citations": [
{
"title": "Best Hotels in NYC 2024",
"url": "https://www.travelandleisure.com/best-hotels-nyc",
"position": 1
}
],
"search_sources": [
{
"url": "https://www.travelandleisure.com/best-hotels-nyc",
"title": "Best Hotels in NYC",
"favicon": "https://www.travelandleisure.com/favicon.ico"
}
],
"links_attached": [
{
"url": "https://www.theplazany.com",
"text": "The Plaza",
"position": 0
}
],
"recommendations": [],
"references": [],
"country": "us",
"is_map": true,
"shopping_visible": false,
"prompt_sent_at": "2024-12-15T10:30:00.000Z",
"index": null
}
]
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Must be gd_m7aof0k82r803d5bjm for this dataset.
Send notifications when the request is completed.
Include errors in the response.
Body
application/json
Array of input objects. See Request Body below for the supported fields.
Show child attributes
Show child attributes
Response
200 - application/json
OK. See response example below the parameters.
Was this page helpful?