大规模地获取 Google AI 模式的响应,而不受限制。
Google AI Mode scraper lets you send prompts and reliably extract AI responses at scale without blocks. Built on the Web Scraper API, it delivers parsed data in JSON format while handling proxies, headless browsers, and automated request systems for you. You can use scraped Google AI Mode data to power SEO and GEO projects, build training datasets, or support other data tasks.
Scrape Google AI Mode responses by sending a POST request with your prompt and authentication credentials. See the Python example below, or explore more language samples here.
[!TIP] Get a free trial by registering on the dashboard.
First, install the requests library in your Python environment:
pip install requests
Then, create the following .py file. Make sure to use your Web Scraper API USERNAME and PASSWORD:
import json
import requests
# API parameters.
payload = {
'source': 'google_ai_mode',
'query': 'best health trackers under $200',
'render': 'html',
'parse': True,
'geo_location': 'United States'
}
# Get a response.
response = requests.post(
'https://realtime.oxylabs.io/v1/queries',
# Replace with your credentials.
auth=('USERNAME', 'PASSWORD'),
json=payload,
)
# Print the response to stdout.
print(response.json())
# Save the response to a JSON file.
with open('response.json', 'w') as file:
json.dump(response.json(), file, indent=2)
source (mandatory)
Sets the scraper.
google_ai_mode
query (mandatory)
The prompt or question to submit to Google AI Mode. Cannot exceed 400 characters.
–
render (mandatory)
Setting to html is required for this source.
–
parse
Returns parsed data when set to true.
false
geo_location
Specify a country to send the prompt from. More info.
-
callback_url
URL to your callback endpoint. More info.
–
Check out documentation to learn more.
Below is a trimmed JSON output sample. See the full JSON output here.
…
Alternatively, you can extract the data in Markdown format to streamline integration with AI tools. Find more details here.
google_ai_mode returns structured output with fields such as URL, page, and results. The table below explains each element in detail, outlining its description and data type.
Depending on the search query, both the number of items and the fields included can change.
url
The URL of Google AI Mode.
string
page
Page number.
integer
content
An object containing the parsed Google AI Mode response data.
object
content.links
List of external links referenced in the response. Displayed in the box on the right side of the page.
array
content.prompt
Original prompt submitted to Google AI Mode.
string
content.citations
List of citation links with URLs and associated texts, as shown in the main block of the Google AI Mode response.
array
content.response_text
Complete response text from Google AI Mode.
string
content.markdown_text
Complete Markdown text from Google AI Mode.
string
content.parse_status_code
Status code of the parsing operation.
integer
created_at
Timestamp when the scraping job was created.
timestamp
updated_at
Timestamp when the scraping job was finished.
timestamp
job_id
ID of the job associated with the scraping job.
string
status_code
Status code of the scraping job. You can see the scraper status codes described here.
integer
Scraping Google AI Mode unlocks powerful applications across SEO and GEO analysis, as well as dataset development:
The legality of scraping AI-generated content depends on factors like Google’s terms of service, your use case, and applicable laws. We recommend consulting a legal expert before proceeding.
Yes. The main limitation is prompt size – requests sent to the API cannot exceed 400 characters. Longer prompts need to be shortened before submitting.
For detailed information on API features, integrations, and more examples, see the Web Scraper API documentation.
If you have questions or need support, reach out to us at [email protected], or through live chat, accessible via Oxylabs Dashboard, or join our Discord community. For enterprise-related inquiries, contact your dedicated account manager.
暂无开放 Issues,或尚未同步最近议题。