Integrations / Google Search Console
Google Search Console
See your Search Console sites and sitemaps and query search performance: clicks, impressions, CTR and position by query, page, country or date.
6 actions
OAuth 2
6 read0 write
Calls www.googleapis.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "searchconsole" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
https://www.googleapis.com/auth/userinfo.email | See which Google account you connected |
https://www.googleapis.com/auth/webmasters.readonly | See your Search Console sites and search performance data |
Actions
Get sitereadsearchconsole.get_siteGet one Search Console property and the connected account's permission level on it.
Needs scope: https://www.googleapis.com/auth/webmasters.readonly
| Input | Type | Description | |
|---|---|---|---|
site_url | string | Required | Property URL, e.g. https://www.example.com/ or sc-domain:example.com |
await setu.execute({
userId: "user_1",
action: "searchconsole.get_site",
input: {
"site_url": "<site_url>"
},
});List sitemapsreadsearchconsole.list_sitemapsList the sitemaps submitted for a Search Console property.
Needs scope: https://www.googleapis.com/auth/webmasters.readonly
| Input | Type | Description | |
|---|---|---|---|
site_url | string | Required | Property URL, e.g. https://www.example.com/ |
await setu.execute({
userId: "user_1",
action: "searchconsole.list_sitemaps",
input: {
"site_url": "<site_url>"
},
});List sitesreadsearchconsole.list_sitesList the Search Console properties the connected account can access, with permission level.
Needs scope: https://www.googleapis.com/auth/webmasters.readonly
No input.
await setu.execute({
userId: "user_1",
action: "searchconsole.list_sites",
input: {},
});Query search analyticsreadsearchconsole.query_search_analyticsQuery search performance (clicks, impressions, CTR, average position) for a property over a date range, grouped by dimensions such as query, page, country, device or date.
Needs scope: https://www.googleapis.com/auth/webmasters.readonly
| Input | Type | Description | |
|---|---|---|---|
site_url | string | Required | Search Console property: a URL-prefix like https://www.example.com/ or sc-domain:example.com |
start_date | string | Required | Start date, YYYY-MM-DD |
end_date | string | Required | End date, YYYY-MM-DD |
row_limit | integer | Optional | Rows to return, 1 to 25000 (default 1000) |
type | string | Optional | Search type (default web) |
dimensions | array of string | Optional | Dimensions to group by |
await setu.execute({
userId: "user_1",
action: "searchconsole.query_search_analytics",
input: {
"site_url": "<site_url>",
"start_date": "<start_date>",
"end_date": "<end_date>"
},
});Top pagesreadsearchconsole.top_pagesShortcut for the best-performing pages of a property in a date range, with clicks, impressions, CTR and position.
Needs scope: https://www.googleapis.com/auth/webmasters.readonly
| Input | Type | Description | |
|---|---|---|---|
site_url | string | Required | Search Console property: a URL-prefix like https://www.example.com/ or sc-domain:example.com |
start_date | string | Required | Start date, YYYY-MM-DD |
end_date | string | Required | End date, YYYY-MM-DD |
row_limit | integer | Optional | Rows to return, 1 to 25000 (default 1000) |
type | string | Optional | Search type (default web) |
await setu.execute({
userId: "user_1",
action: "searchconsole.top_pages",
input: {
"site_url": "<site_url>",
"start_date": "<start_date>",
"end_date": "<end_date>"
},
});Top search queriesreadsearchconsole.top_queriesShortcut for the top search queries of a property in a date range, with clicks, impressions, CTR and position.
Needs scope: https://www.googleapis.com/auth/webmasters.readonly
| Input | Type | Description | |
|---|---|---|---|
site_url | string | Required | Search Console property: a URL-prefix like https://www.example.com/ or sc-domain:example.com |
start_date | string | Required | Start date, YYYY-MM-DD |
end_date | string | Required | End date, YYYY-MM-DD |
row_limit | integer | Optional | Rows to return, 1 to 25000 (default 1000) |
type | string | Optional | Search type (default web) |
await setu.execute({
userId: "user_1",
action: "searchconsole.top_queries",
input: {
"site_url": "<site_url>",
"start_date": "<start_date>",
"end_date": "<end_date>"
},
});