Setu Recipes: reusable digital workers across every app.Browse templates

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

TypeScript
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

ScopeWhy it is requested
https://www.googleapis.com/auth/userinfo.emailSee which Google account you connected
https://www.googleapis.com/auth/webmasters.readonlySee 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

InputTypeDescription
site_urlstringRequiredProperty URL, e.g. https://www.example.com/ or sc-domain:example.com
TypeScript
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

InputTypeDescription
site_urlstringRequiredProperty URL, e.g. https://www.example.com/
TypeScript
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.

TypeScript
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

InputTypeDescription
site_urlstringRequiredSearch Console property: a URL-prefix like https://www.example.com/ or sc-domain:example.com
start_datestringRequiredStart date, YYYY-MM-DD
end_datestringRequiredEnd date, YYYY-MM-DD
row_limitintegerOptionalRows to return, 1 to 25000 (default 1000)
typestringOptionalSearch type (default web)
dimensionsarray of stringOptionalDimensions to group by
TypeScript
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

InputTypeDescription
site_urlstringRequiredSearch Console property: a URL-prefix like https://www.example.com/ or sc-domain:example.com
start_datestringRequiredStart date, YYYY-MM-DD
end_datestringRequiredEnd date, YYYY-MM-DD
row_limitintegerOptionalRows to return, 1 to 25000 (default 1000)
typestringOptionalSearch type (default web)
TypeScript
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

InputTypeDescription
site_urlstringRequiredSearch Console property: a URL-prefix like https://www.example.com/ or sc-domain:example.com
start_datestringRequiredStart date, YYYY-MM-DD
end_datestringRequiredEnd date, YYYY-MM-DD
row_limitintegerOptionalRows to return, 1 to 25000 (default 1000)
typestringOptionalSearch type (default web)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "searchconsole.top_queries",
  input: {
    "site_url": "<site_url>",
    "start_date": "<start_date>",
    "end_date": "<end_date>"
  },
});