https://www.googleapis.com/auth/webmasters, which covers the reads and the sitemap writes.
Things to know before you call:
- A property is named the way Search Console names it.
https://example.com/for a URL-prefix property, orsc-domain:example.comfor a domain property. Both travel in the path, and the plugin encodes them. - Dates are Pacific Time.
startDateandendDateareYYYY-MM-DDin the API’s own time zone, and the end date is included in the range. rowLimitis 1 to 25,000, default 1,000. There is no page token: page withstartRow, and astartRowpast the end answers a successful empty page.- Results are grouped by the dimensions you ask for, sorted by clicks descending.
ctris a fraction, so0.05is 5%. HOURneedsdataState: 'HOURLY_ALL', and hourly data only goes back 10 days. The plugin refuses the combination without the state rather than letting the API reject it.typeandsearchTypeare the same setting. Send one; the plugin rejects both.- A sitemap’s
feedpathis a full URL, not a path, and it is submitted with a PUT that has no body. Google fetches it. - URL inspection has its own quota: 2,000 per day and 600 per minute per site. Search Analytics allows 1,200 per minute per site, and a load-quota refusal asks for a 15 minute wait.
- No inbound webhooks. The API does not send any.
- 10 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- OAuth 2.0 (Recommended)
Open hub.corsair.dev, navigate to your project, and enter the client ID and client secret from your Google Search Console OAuth app.More: OAuth 2.0
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Read the top queries for a property over a monthWhat’s next
API reference
Every
googlesearchconsole.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.