Skip to content

[Google Search API] Include "Results for" location in search_information #2317

@NateSkiles

Description

@NateSkiles

An enterprise customer requested we include the location returned by Google in search_information.

The customer noted that often, for natural disasters specifically, Google will return results for the location of the disaster, regardless of the location set. The customer hypothesized that Google does this to return more localized news results specific to the area affected, regardless of the location requested.

Example: la wildfires

image

https://serpapi.com/playground?q=la+wildfires&location=Austin%2C+Texas%2C+United+States&gl=us&hl=en&google_domain=google.com&newPara=chips+stick+highlight+lr+as_qdr+safe+google_domain+si+form+filter+as_epq+client+votes+site+ie+oe+pws+ibp+source+as_sitesearch+ijn+rlz+interval+size+color+maxPrice+as_dt

search_parameters.location_used does not match the location Google used to return results. The customer suggested we scrape and return the location Google displayed for the search in search_information, similar to how we display query_displayed or spelling fixes.

This is reproducible in the browser:

image

https://www.google.com/search?q=la+wildfires&oq=la+wildfires&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg80gEIMTgwOGowajGoAgCwAgA&sourceid=chrome&ie=UTF-8

Search Inspect

Front

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions