Google News
SERP API Google Query Parameters
Configure Google News queries using Thordata’s SERP API, including localization parameters, pagination, and "advanced filters" output options.
q
,Search Query(Required)
Define the search query used for data crawling (default value: q=pizza
). Any keywords in any language are supported.
Example Request:
Example with q
:pizza parameter
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "json=1"
Localization
gl
,Country(Optional)
Specifies the country/region for localized search results (default: us
). Uses a two-letter country code (e.g., us
, ru
, uk
).
For supported codes, see Google’s Country List.
Example Request:
Example results for q
: pizza,gl
: ru
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "gl=ru" \
-d "json=1"
hl
,Language(Optional)
Sets the UI language for search results (default: en
). Uses a two-letter language code (e.g., en
, es
, zh-CN
).
Full list: Google Language Codes.
Example Request:
Example results for q
: pizza,hl
: es
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google" \
-d "q=pizza" \
-d "json=1" \
-d "hl=es"
Advanced Filters
topic_token
,Topic token(Optional)
Parameter defines the Google News topic token. It is used for accessing the news results for a specific topic (e.g., "World", "Business", "Technology").
Code Example:
Example results for q
: pizza,topic_token
:Technology
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "json=1" \
-d "topic_token=Technology"
publication_token
,Publication token(Optional)
Parameter defines the Google News publication token. It is used for accessing the news results from a specific publisher (e.g., "CNN", "BBC", "The Guardian").
Example Request:
Example results for q
: pizza,publication_token
:BBC
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "json=1" \
-d "publication_token=BBC"
section_token
,Section token(Optional)
Parameter defines the Google News section token. It is used for accessing the sub-section of a specific topic. (e.g., "Business -> Economy").
Code Example:
Example results for q
: pizza,section_token
:Business
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "json=1" \
-d "section_token=Business"
story_token
,Story token(Optional)
Parameter defines the Google News story token. It is used for accessing the news results with full coverage of a specific story.
Code Example:
Example results for q
: pizza,story_token
:story
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "json=1" \
-d "story_token=story"
so
,Sort By(Optional)
Parameter defines the sorting method. Results can be sorted by relevance or by date. By default, the results are sorted by relevance.
List of supported values are:
0
- Relevance
1
- Date
Code Example:
Example results for q
: pizza,so
:1
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_news" \
-d "q=pizza" \
-d "json=1" \
-d "so=1"
For further assistance, contact us at [email protected].
Last updated
Was this helpful?