# Google Search Console

> Query Search Console data via OAuth.

Lets an agent read Search Console analytics for sites you own or
manage.

## What it can do

| Method | What it does |
| --- | --- |
| `search_console_list_sites` | List sites and properties verified on the connected account. |
| `search_console_search_analytics_query` | Run a Search Analytics query - site_url, dates, dimensions, row_limit. |

## How to get credentials

Google OAuth - no token to copy.

1. Start setup and enter the Google email that owns the verified sites.
2. Approve (`webmasters.readonly`).

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `USER_GOOGLE_EMAIL` | The Google account verified for the sites |

## Troubleshooting

- **`site_url` rejected** - it must exactly match the value returned by
  `list_sites` (e.g. `sc-domain:example.com` or `https://example.com/`
  with trailing slash).

## Links

- [Search Console API](https://developers.google.com/webmaster-tools/search-console-api-original)
