# Update Settings

Configure the Google Search Scraper parameters

Configure the scraper parameters to control how Google Search results are collected. These settings include pagination, location and language.

## Headers

<ParamField header="Authorization" type="string" required>
  Your API authentication token. Value: `Token YOUR_API_KEY`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Request body format. Value: `application/json`
</ParamField>

## Scraper Parameters

Set these parameters in the `params` object:

| Parameter | Type | Description |
| --- | --- | --- |
| **max_pages** | integer | Maximum search result pages to crawl per keyword. Google limits to ~300-400 total results. The scraper always requests 10 results per page and paginates. |
| **max_unique_results_per_run** | integer | Maximum number of unique results retrieved across all tasks in the entire run. Leave empty for unlimited. |
| **country** | string | Sets IP origin country and Google domain (e.g., `google.fr` for France). Default: `United States` |
| **location** | string | Geographic bias for results (state, city). Use Get Geolocation to find valid values. |
| **language** | string | Language for search results. Defaults to English for the chosen country. |
| **collect_shopping_results** | boolean | Also collect the Google Shopping results for each keyword (first page, up to 40 products): seller, price, rating, reviews and image. Uses the same country, language and location as the search. Billed at 1 credit per shopping result. Default: `false` |

<Tip>
  Use the Get Geolocation endpoint to discover valid `location` values.
</Tip>

<Note>
  Higher `max_pages` values will collect more results but use more credits.
</Note>

## Code Examples

<CodeGroup>
```bash cURL
curl -X POST "https://api.lobstr.io/v1/squids/YOUR_SQUID_HASH" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Google Search Scraper",
    "concurrency": 1,
    "export_unique_results": true,
    "to_complete": false,
    "no_line_breaks": true,
    "params": {
      "country": "United States",
      "language": "English",
      "max_pages": 4,
      "max_unique_results_per_run": 500,
      "location": "Alabama",
      "collect_shopping_results": false
    }
  }'
```

```python Python
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}"}

squid_id = "YOUR_SQUID_HASH"

# Update scraper settings
response = requests.post(f"{BASE_URL}/squids/{squid_id}",
    headers=headers,
    json={
        "name": "Google Search Scraper",
        "concurrency": 1,
        "export_unique_results": True,
        "to_complete": False,
        "no_line_breaks": True,
        "params": {
            "country": "United States",
            "language": "English",
            "max_pages": 4,
            "max_unique_results_per_run": 500,
            "location": "Alabama",
            "collect_shopping_results": False
        }
    }
)

data = response.json()
print(f"Updated: {data['name']}")
print(f"Max pages: {data['params']['max_pages']}")
print(f"Location: {data['params']['location']}")
```
</CodeGroup>

## Response

```json 201
{
  "name": "Google Search Scraper",
  "no_line_breaks": true,
  "params": {
    "country": "United States",
    "language": "English",
    "max_pages": 4,
    "max_unique_results_per_run": 500,
    "location": "Alabama",
    "collect_shopping_results": false
  },
  "to_complete": false,
  "export_unique_results": true
}
```
