ByteChef LogoByteChef

Google Search Console

The Search Console API provides access to both Search Console data (verified users only) and to public information on an URL basis (anyone).

Categories: Productivity and Collaboration

Type: googleSearchConsole/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue

Connection Setup

Create OAuth 2.0 Application

Creation of OAuth 2.0 application is documented here.

Enable Google Search Console API

  1. In the Google Cloud Console, select your project.
  2. Go to the APIs & Services.
  3. Click on ENABLE APIS AND SERVICES.
  4. Search for "google search console api" in the search bar.
  5. Click on Google Search Console API.
  6. Click Enable.

Actions

Add Site

Name: addSite

Adds a site to the set of the user's sites in Search Console.

Properties

NameLabelTypeDescriptionRequired
siteUrlSite URLSTRINGThe URL of the site to add.true

Example JSON Structure

{
  "label" : "Add Site",
  "name" : "addSite",
  "parameters" : {
    "siteUrl" : ""
  },
  "type" : "googleSearchConsole/v1/addSite"
}

Output

This action does not produce any output.

Delete Site

Name: deleteSite

Removes a site from the set of the user's Search Console sites.

Properties

NameLabelTypeDescriptionRequired
siteUrlSite URLSTRINGThe URI of the property as defined in Search Console. Examples: http://www.example.com/ or sc-domain:example.com.true

Example JSON Structure

{
  "label" : "Delete Site",
  "name" : "deleteSite",
  "parameters" : {
    "siteUrl" : ""
  },
  "type" : "googleSearchConsole/v1/deleteSite"
}

Output

This action does not produce any output.

Get Site

Name: getSite

Retrieves information about specific site.

Properties

NameLabelTypeDescriptionRequired
siteUrlSite URLSTRINGThe URI of the property as defined in Search Console. Examples: http://www.example.com/ or sc-domain:example.com.true

Example JSON Structure

{
  "label" : "Get Site",
  "name" : "getSite",
  "parameters" : {
    "siteUrl" : ""
  },
  "type" : "googleSearchConsole/v1/getSite"
}

Output

Type: OBJECT

Properties

NameTypeDescription
permissionLevelSTRING
Options SITE_PERMISSION_LEVEL_UNSPECIFIED, SITE_OWNER, SITE_FULL_USER, SITE_RESTRICTED_USER, SITE_UNVERIFIED_USER
The user's permission level for the site.
siteUrlSTRINGThe URL of the site.

Output Example

{
  "permissionLevel" : "",
  "siteUrl" : ""
}

List Sites

Name: listSites

Lists the user's Search Console sites.

Example JSON Structure

{
  "label" : "List Sites",
  "name" : "listSites",
  "type" : "googleSearchConsole/v1/listSites"
}

Output

Type: OBJECT

Properties

NameTypeDescription
siteEntryARRAY
Items [{STRING(permissionLevel), STRING(siteUrl)}]
Contains permission level information about a Search Console site. For more information, see Permissions in Search Console.

Output Example

{
  "siteEntry" : [ {
    "permissionLevel" : "",
    "siteUrl" : ""
  } ]
}

Search Analytics

Name: searchAnalytics

Query your data with filters and parameters that you define.

Properties

NameLabelTypeDescriptionRequired
siteUrlSite URLSTRINGThe site's URL, including protocol. For example: http://www.example.com/.true
startDateStart DateDATEStart date of the requested date range. This value is included in the range.true
endDateEnd DateDATEEnd date of the requested date range. This value is included in the range.true
dimensionsDimensionsARRAY
Items [STRING]
Dimensions to group results by. Dimensions are the group-by values in the Search Analytics page.false
typeTypeSTRING
Options WEB, IMAGE, VIDEO, NEWS, DISCOVER, GOOGLE_NEWS
Filter results to the following type.false
dimensionFilterGroupsFiltersARRAY
Items [{[{STRING(dimension), STRING(operator), STRING(expression)}](filters), STRING(groupType)}]
Filters to apply to the dimension grouping values.false
searchTypeSearch TypeSTRING
Options WEB, IMAGE, VIDEO, NEWS, DISCOVER, GOOGLE_NEWS
The search type to filter for.false
aggregationTypeAggregation TypeSTRING
Options AUTO, BY_PROPERTY, BY_PAGE
How data is aggregated.false
rowLimitRow LimitINTEGERThe maximum number of rows to return.false

Example JSON Structure

{
  "label" : "Search Analytics",
  "name" : "searchAnalytics",
  "parameters" : {
    "siteUrl" : "",
    "startDate" : "2021-01-01",
    "endDate" : "2021-01-01",
    "dimensions" : [ "" ],
    "type" : "",
    "dimensionFilterGroups" : [ {
      "filters" : [ {
        "dimension" : "",
        "operator" : "",
        "expression" : ""
      } ],
      "groupType" : ""
    } ],
    "searchType" : "",
    "aggregationType" : "",
    "rowLimit" : 1
  },
  "type" : "googleSearchConsole/v1/searchAnalytics"
}

Output

Type: OBJECT

Properties

NameTypeDescription
responseAggregationTypeSTRING
Options AUTO, BY_PROPERTY, BY_PAGE
How the results were aggregated.
rowsARRAY
Items [{NUMBER(clicks), NUMBER(ctr), NUMBER(impressions), [STRING](keys), NUMBER(position)}]
A list of rows grouped by the key values in the order given in the query.

Output Example

{
  "responseAggregationType" : "",
  "rows" : [ {
    "clicks" : 0.0,
    "ctr" : 0.0,
    "impressions" : 0.0,
    "keys" : [ "" ],
    "position" : 0.0
  } ]
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

Troubleshooting

Access Blocked: Verification Process Not Completed

Documentation for how to add a test user can be found here

How is this guide?

Last updated on

On this page