Google Related Questions API Documentation
The Google Related Questions API expands "People Also Ask" questions from Google Search results.
Use the next_page_token from the Google Search API to fetch detailed answers and discover additional related questions.
API Parameters
Next Page Token
-
- Name
-
next_page_token - Required
- Required
- Description
-
The
next_page_tokenis used to fetch expanded answers for "People Also Ask" questions. This token is returned in therelated_questionsarray from Google Search API results. Each question returned by this API also includes its ownnext_page_token, allowing you to recursively explore related questions.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
google_related_questions.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
API Examples
Related Questions Response
https://www.searchapi.io/api/v1/search?engine=google_related_questions&next_page_token=eyJmYyI6IkVxRUJDbUpCVFc0ekxYbFNNbkpvVGxCa1FWQnFXbEJOUXpSaE9WZG5YMEl4U1VaRlNFZHBjaTFRY2xOU0xWWnVTV0kxZDNSM1pqSnZZM2hSV0VadllYbFlTVXBRTjI0NU5rWTVZblpDWDJKWU5WSnhaSHBGTTNwdWRYRTNSWEZoZVRWZlNWUlpkeElYYTFseFEyRmtXRU5IWVZNeWRuSXdVRGRhZWs5dFFXTWFJa0ZLUzB4R2JVbDJSRmhpTVRJMWJYRlFWVlpJTFZabVZIWlhkMHBEUTA1RGNIYyIsImZjdiI6IjMiLCJ2ZXQiOiIyYWhVS0V3aVZ6NFczd3I2U0F4VWttNjhCSFcyT0UzTVFxN2tCS0FCNkJBaElFQUEiLCJxIjoiV2hhdCBleGFjdGx5IGRvZXMgYSBWUE4gZG8_IiwibGsiOiJHaHAzYUdGMElHVjRZV04wYkhrZ1pHOWxjeUJoSUhad2JpQmtidyIsImdsIjoidXMiLCJobCI6ImVuIn0
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_related_questions",
"next_page_token": "eyJmYyI6IkVxRUJDbUpCVFc0ekxYbFNNbkpvVGxCa1FWQnFXbEJOUXpSaE9WZG5YMEl4U1VaRlNFZHBjaTFRY2xOU0xWWnVTV0kxZDNSM1pqSnZZM2hSV0VadllYbFlTVXBRTjI0NU5rWTVZblpDWDJKWU5WSnhaSHBGTTNwdWRYRTNSWEZoZVRWZlNWUlpkeElYYTFseFEyRmtXRU5IWVZNeWRuSXdVRGRhZWs5dFFXTWFJa0ZLUzB4R2JVbDJSRmhpTVRJMWJYRlFWVlpJTFZabVZIWlhkMHBEUTA1RGNIYyIsImZjdiI6IjMiLCJ2ZXQiOiIyYWhVS0V3aVZ6NFczd3I2U0F4VWttNjhCSFcyT0UzTVFxN2tCS0FCNkJBaElFQUEiLCJxIjoiV2hhdCBleGFjdGx5IGRvZXMgYSBWUE4gZG8_IiwibGsiOiJHaHAzYUdGMElHVjRZV04wYkhrZ1pHOWxjeUJoSUhad2JpQmtidyIsImdsIjoidXMiLCJobCI6ImVuIn0"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_Y0xJz68VA7gfNevqPjlCktSF",
"status": "Success",
"created_at": "2025-02-04T14:55:44Z",
"request_time_taken": 0.89,
"parsing_time_taken": 0.02,
"total_time_taken": 0.91,
"request_url": "https://www.google.com/search?q=Can+you+detect+if+someone+is+using+a+VPN%3F",
"html_url": "https://www.searchapi.io/api/v1/searches/search_Y0xJz68VA7gfNevqPjlCktSF.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_Y0xJz68VA7gfNevqPjlCktSF"
},
"search_parameters": {
"engine": "google_related_questions",
"next_page_token": "eyJmYyI6IkVxRUJDbUpCV..."
},
"related_questions": [
{
"question": "Is VPN really necessary?",
"answer": "A VPN can protect your privacy by hiding your IP address and encrypting your data. If you frequently use public Wi-Fi, handle sensitive information, or want to access geo-restricted content, a VPN is highly recommended.",
"answer_highlight": "protect your privacy",
"source": {
"title": "Do You Really Need a VPN? - TechRadar",
"link": "https://www.techradar.com/vpn/do-you-really-need-a-vpn",
"displayed_link": "https://www.techradar.com › vpn › do-you-really-need-a-vpn",
"domain": "techradar.com"
},
"next_page_token": "eyJmYyI6IkVxRUJDbUpC..."
},
{
"question": "What are the disadvantages of VPN?",
"is_ai_overview": true,
"text_blocks": [
{
"type": "paragraph",
"answer": "VPNs have several potential drawbacks to consider:"
},
{
"type": "list",
"answer": "Slower internet speeds due to encryption overhead"
},
{
"type": "list",
"answer": "Some streaming services block VPN connections"
},
{
"type": "list",
"answer": "Free VPNs may log your data or display ads"
}
],
"markdown": "VPNs have several potential drawbacks to consider:\n\n- Slower internet speeds due to encryption overhead\n- Some streaming services block VPN connections\n- Free VPNs may log your data or display ads",
"reference_links": [
{
"index": 0,
"title": "VPN Disadvantages - Norton",
"link": "https://us.norton.com/blog/privacy/vpn-disadvantages",
"snippet": "While VPNs offer privacy benefits, they can also slow down your connection speed...",
"source": "norton.com",
"thumbnail": "https://us.norton.com/content/dam/blogs/images/vpn-disadvantages.jpg"
}
],
"next_page_token": "eyJxIjoiV2hhdCBhcmUg..."
}
]
}