Skip to main content

Locations

In order to use a location with your searches, you can provide the parameter location, to get the right value for this you can use our location API

Example Result

GET https://app.serpextractor.com/api/locations?location_contains=paris&country_code=fr
View response json example
{
"total_locations": 4,
"locations": [
{
"location": "Paris,Paris,Ile-de-France,France",
"country_code": "FR"
},
{
"location": "Cormeilles-en-Parisis,Ile-de-France,France",
"country_code": "FR"
},
{
"location": "Villeparisis,Ile-de-France,France",
"country_code": "FR"
},
{
"location": "Seyssinet-Pariset,Auvergne-Rhone-Alpes,France",
"country_code": "FR"
}
]
}

You can filter a location by the country_code and also what the location_contains, and get the locations from there, we can also provide you a .csv with the location on request or you can it directly from Google.

Once you have the location string, you can use it for your requests, with the location parameter, pelase note that for the best results, you should use it alongside the hl and gl parameters or even better if you limit the search to a country and a langugae using the cr and lr parameters. Also even though we will send the request to google with that location, please note that there is no guarantee that you will get only results, as sometimes google will show general results, but what we guarantee is that a person doing the same request from the location selected by you will see the same results.

tip

Using cr and lr with the location seems to offer the best results if you want to scrape local serps, like a person from that location would most probably see the results, if they have their own language set on google or if they are using a new session