Google Search Console
Google Search Console data: queries, clicks, impressions and positions of the site in search results.
Connection type: For the app and the agent. Sign-in: Sign in with a Google account in the provider's window and approve the permissions listed below. No passwords or keys are entered in Bloklo.
How it works
The app and the agent never see the credentials. They call the Google Search Console API through the Bloklo gateway, for example fetch("/gw/<connection id>/webmasters/v3/sites"). The gateway appends the path to the address https://searchconsole.googleapis.com, adds an access token from the Google sign-in, renewed automatically, and passes the service's response back to the app.
- Reads (GET) go through at once. Writes (POST, PUT, PATCH, DELETE) go through at once only when the connection is set to Always allow; otherwise the gateway returns status 202 with an
approval_idand the write waits for approval in the panel (see Agent permissions). - The Test button sends
GET /webmasters/v3/sitesand checks that the service accepted the credentials.
Search Console API with JSON bodies; the site address in the path is URL-encoded (sc-domain%3Aexample.com or https%3A%2F%2Fwww.example.com%2F). The searchAnalytics/query call takes startDate and endDate (Pacific time, inclusive), dimensions, type, dataState, rowLimit (1–25,000, default 1,000) and startRow for paging. Rows contain keys, clicks, impressions, ctr and position.
Before you start
- A Google account with access to the data the app should use.
Connecting in Bloklo
- Open Connectors in the sidebar and find Google Search Console.
- Click Connect and enter a connection name in Details.
- Click Connect. The Google sign-in window opens.
- Choose the Google account and approve the permissions. After approval you return to Bloklo and the connection is active.
- Attach the connection to a project: Attach to a project… on the connection page, or describe the task in the project chat.
Until Google verifies the Bloklo app, the sign-in window may warn that the app is unverified. To continue, choose Advanced and then Go to bloklo.com. Until then at most 100 Google accounts can connect.
Provider permissions
Bloklo asks Google for exactly these scopes: https://www.googleapis.com/auth/webmasters.readonly. Access can be revoked at any time by removing the connection in Bloklo or in the Google account settings.
The Google account must be an owner or user of the site in Search Console. Data appears with a 2–3 day delay and covers the last 16 months.
Google Search Console documentation
Example prompts
Prompts to type in the chat of a project with the connection attached:
- “Build a dashboard of top Google queries from the last 30 days with click counts.”
- “Show a daily chart of clicks and impressions for my site.”
- “Add a list of pages with the biggest drop in clicks compared with last month.”
API methods
The most commonly used Google Search Console API methods. The path goes after /gw/<connection id>; parts in braces, such as {id}, are replaced with values. The gateway treats every request other than GET as a write, including queries sent with POST (such as search or GraphQL), so they need approval unless the connection is set to Always allow. The full list of methods is in the provider's documentation.
| Method | Path | What it does | In the gateway |
|---|---|---|---|
GET | /webmasters/v3/sites | List sites and permission levels | read |
GET | /webmasters/v3/sites/{siteUrl} | Retrieve a site | read |
POST | /webmasters/v3/sites/{siteUrl}/searchAnalytics/query | Report clicks, impressions and positions | write (approval) |
GET | /webmasters/v3/sites/{siteUrl}/sitemaps | List sitemaps | read |
GET | /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath} | Retrieve a sitemap | read |
PUT | /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath} | Submit a sitemap (needs the write scope) | write (approval) |
POST | /v1/urlInspection/index:inspect | Inspect the index status of a URL | write (approval) |
Service limits
Search Analytics: 1,200 queries per minute per site and per user, 40,000 per minute and 30,000,000 per day per project; short-term load is measured in 10-minute windows and after exceeding it you wait 15 minutes. URL inspection: 2,000 per day and 600 per minute per site. Other resources: 20 per second and 200 per minute per user. rowLimit is at most 25,000 rows per request.
Google Search Console API reference
Agent actions and permissions
| Action | Type | What the agent uses it for |
|---|---|---|
| Read data | read | Fetches data from the service, such as a list of records, to build and check the app. Examples: list sites and permission levels; retrieve a site; list sitemaps. |
| Write data | write | Requests other than GET: creating, changing or deleting data in the service, and also queries sent with POST (such as search). Examples: report clicks, impressions and positions; submit a sitemap (needs the write scope); inspect the index status of a URL. |
By default, reads run without asking and writes need approval in the chat. Change this on the connector page or in Settings → Agent permissions (see Agent permissions).
Troubleshooting
The connection says it needs reconnecting
Access was revoked in the Google account, expired, or the password changed. Open the connection and click Authorize.
The test returns HTTP 403
The account has no access to this data, or some permissions were unticked during sign-in. Reconnect and approve all permissions.
Limits and security
- One connection can make up to 1,000 requests per minute; the service's own limits also apply.
- Credentials are encrypted and not shown in the browser after saving; only the names of stored fields are visible.
- A published app works for every visitor: protect the data the connection gives access to with sign-in in the app.
Something unclear or out of date? Contact us