# Google Search Console

> Connect Google Search Console to sanda: what to prepare, the fields the connection form asks for, and how its data lands in your warehouse.

## Connect Google Search Console

:::steps
1. **Open the catalogue.** In the console, go to **Data · Connections** and press **New connection**.
2. **Choose Google Search Console.** It is listed under marketing and analytics; you can also search for it by name.
3. **Fill in the form.** Enter the fields below. Credentials go straight to sanda’s sync engine and are never stored in sanda’s database.
4. **Choose what to sync.** Pick the tables you want, and a sync mode for each. See [choose what to sync](https://docs.sanda-os.com.au/connections/choose-tables).
5. **Run the first sync.** sanda tests the connection, then lands each table you chose in your warehouse.
:::

## Configuration fields

What the connection form asks for. Required fields are marked; the rest are optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **Website URL Property** | array | Yes | The URLs of the website property attached to your GSC account. |
| **Start Date** | string | No | UTC date in the format YYYY-MM-DD. Any data before this date will not be replicated. Default `2021-01-01`. |
| **End Date** | string | No | UTC date in the format YYYY-MM-DD. Any data created after this date will not be replicated. Must be greater or equal to the start date field. Leaving this field blank will replicate all data from the start date onward. |
| **Authentication Type** | one of 2 options | Yes |  |
| **Custom Reports** | array | No | You can add your Custom Analytics report by creating one. |
| **Data Freshness** | string | No | If set to 'final', the returned data will include only finalized, stable data. If set to 'all', fresh data will be included. When using Incremental sync mode, we do not recommend setting this parameter to 'all' as it may cause data loss. One of `final`, `all`. Default `final`. |
| **Number of concurrent threads** | integer | No | The number of worker threads to use for the sync. Default `40`. |
| **Always Use Aggregation Type Auto** | boolean | No | Some search analytics streams fail with a 400 error if the specified `aggregationType` is not supported. This is customer implementation dependent and if this error is encountered, enable this setting which will override the existing `aggregationType` to use `auto` which should resolve the stream errors. Default `false`. |
| **Search Analytics API Requests Per Minute** | integer | No | The maximum number of requests per minute for Search Analytics API calls. The default (1200) matches Google's documented maximum quota. If you are experiencing rate limit errors, you may need to lower this value. Most new Google Cloud projects start with a quota of 60 requests per minute. Check your Google Cloud Console quotas to see your actual limit. Default `1200`. |

### Authentication Type


Choose one of the following. Each asks for its own fields.

**OAuth**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **Access Token** | string, secret | No | Access token for making authenticated requests. |
| **Client ID** | string, secret | Yes | The client ID of your Google Search Console developer application. |
| **Client Secret** | string, secret | Yes | The client secret of your Google Search Console developer application. |
| **Refresh Token** | string, secret | Yes | The token for obtaining a new access token. |

**Service Account Key Authentication**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **Admin Email** | string | Yes | The email of the user which has permissions to access the Google Workspace Admin APIs. |
| **Service Account JSON Key** | string, secret | Yes | The JSON key of the service account to use for authorization. |


## Related

:::links
- [Sync modes](https://docs.sanda-os.com.au/connections/sync-modes): How sanda reads each table on every run.
- [Sync schedules](https://docs.sanda-os.com.au/connections/schedules): How often a connection runs.
- [Allowlist sanda’s address](https://docs.sanda-os.com.au/connections/allowlist): For a system behind a firewall.
- [Troubleshoot connections](https://docs.sanda-os.com.au/connections/troubleshooting): What an error means and how to fix it.
:::
