{"openapi":"3.0.0","info":{"description":"Google Search Console API — search analytics, sitemaps, site management and URL inspection for verified sites","version":[{"name":"v1","value":"v1"}]},"servers":[{"description":"Google Search Console API — search analytics, sitemaps, site management and URL inspection for verified sites","url":"https://api.apirails.com/googlesearchconsole"}],"paths":{"/v1/urlInspection/index/inspect":{"post":{"tags":["Index"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/urlInspection.index/inspect","api_endpoint":"https://searchconsole.googleapis.com/v1/urlInspection/index:inspect"},"summary":"Index inspection.","description":"Index inspection.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"inspectionUrl":{"type":"string","description":"Required. URL to inspect. Must be under the property specified in \"site_url\"."},"languageCode":{"type":"string","description":"Optional. An [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language code representing the requested language for translated issue messages, e.g. \"en-US\", \"or \"de-CH\". Default value is \"en-US\"."},"siteUrl":{"type":"string","description":"Required. The URL of the property as defined in Search Console. **Examples:** http://www.example.com/ for a URL-prefix property, or sc-domain:example.com for a Domain property."}}},"example":{"inspectionUrl":"example-inspectionurl","languageCode":"example-languagecode","siteUrl":"example-siteurl"}}}}}},"/webmasters/v3/sites/{siteUrl}/sitemaps":{"get":{"tags":["Sitemaps"],"parameters":[{"name":"siteUrl","in":"path","description":"The site's URL, including protocol. For example: http://www.example.com/.","required":true,"schema":{"type":"string","example":""}},{"name":"sitemapIndex","in":"query","description":"A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sitemaps/list","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps"},"summary":"Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).","description":"Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).","security":[{"bearerAuth":[]}]}},"/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}":{"delete":{"tags":["Sitemaps"],"parameters":[{"name":"feedpath","in":"path","description":"The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml.","required":true,"schema":{"type":"string","example":""}},{"name":"siteUrl","in":"path","description":"The site's URL, including protocol. For example: http://www.example.com/.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sitemaps/delete","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}"},"summary":"Deletes a sitemap from the Sitemaps report.","description":"Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"put":{"tags":["Sitemaps"],"parameters":[{"name":"feedpath","in":"path","description":"The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml.","required":true,"schema":{"type":"string","example":""}},{"name":"siteUrl","in":"path","description":"The site's URL, including protocol. For example: http://www.example.com/.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sitemaps/submit","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}"},"summary":"Submits a sitemap for a site.","description":"Submits a sitemap for a site.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Sitemaps"],"parameters":[{"name":"feedpath","in":"path","description":"The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml.","required":true,"schema":{"type":"string","example":""}},{"name":"siteUrl","in":"path","description":"The site's URL, including protocol. For example: http://www.example.com/.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sitemaps/get","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}"},"summary":"Retrieves information about a specific sitemap.","description":"Retrieves information about a specific sitemap.","security":[{"bearerAuth":[]}]}},"/webmasters/v3/sites/{siteUrl}/searchAnalytics/query":{"post":{"tags":["Searchanalytics"],"parameters":[{"name":"siteUrl","in":"path","description":"The site's URL, including protocol. For example: http://www.example.com/.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/searchanalytics/query","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}/searchAnalytics/query"},"summary":"Query your data with filters and parameters that you define.","description":"Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"Optional. [Optional; Default is \\\"web\\\"] Type of report: search type, or either Discover or Gnews.","enum":["WEB","IMAGE","VIDEO","NEWS","DISCOVER","GOOGLE_NEWS"]},"aggregationType":{"type":"string","description":"[Optional; Default is \\\"auto\\\"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help documentation to learn how data is calculated differently by site versus by page. **Note:** If you group or filter by page, you cannot aggregate by property. If you specify any value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your aggregation type if the requested type is invalid.","enum":["AUTO","BY_PROPERTY","BY_PAGE","BY_NEWS_SHOWCASE_PANEL"]},"dataState":{"type":"string","description":"The data state to be fetched, can be full or all, the latter including full and partial data.","enum":["DATA_STATE_UNSPECIFIED","FINAL","ALL","HOURLY_ALL"]},"dimensionFilterGroups":{"type":"array","description":"[Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains \\\"buy\\\"' to see only data where the query string contains the substring \\\"buy\\\" (not case-sensitive). You can filter by a dimension without grouping by it. (array of objects)","items":{"type":"object","properties":{"filters":{"type":"array","description":"Optional. A list of single-value filters in this group. (array of objects)"},"groupType":{"type":"string","description":"Optional. The logic operator between filters of the same group.","enum":["AND"]}}}},"dimensions":{"type":"array","description":"[Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each row. Results are grouped in the order that you supply these dimensions.","items":{"type":"string"}},"endDate":{"type":"string","description":"[Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range."},"rowLimit":{"type":"number","description":"[Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 25,000 (inclusive)."},"searchType":{"type":"string","description":"[Optional; Default is \\\"web\\\"] The search type to filter for.","enum":["WEB","IMAGE","VIDEO","NEWS","DISCOVER","GOOGLE_NEWS"]},"startDate":{"type":"string","description":"[Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range."},"startRow":{"type":"number","description":"[Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number."}}},"example":{"type":"WEB","aggregationType":"AUTO","dataState":"DATA_STATE_UNSPECIFIED","dimensionFilterGroups":"example-dimensionfiltergroups","dimensions":"example-dimensions","endDate":"example-enddate","rowLimit":10,"searchType":"WEB","startDate":"example-startdate","startRow":1}}}}}},"/webmasters/v3/sites":{"get":{"tags":["Sites"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sites/list","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites"},"summary":"Lists the user's Search Console sites.","description":"Lists the user's Search Console sites.","security":[{"bearerAuth":[]}]}},"/webmasters/v3/sites/{siteUrl}":{"get":{"tags":["Sites"],"parameters":[{"name":"siteUrl","in":"path","description":"The URI of the property as defined in Search Console. **Examples:** http://www.example.com/ or sc-domain:example.com.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sites/get","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}"},"summary":"Retrieves information about specific site.","description":"Retrieves information about specific site.","security":[{"bearerAuth":[]}]},"put":{"tags":["Sites"],"parameters":[{"name":"siteUrl","in":"path","description":"The URL of the site to add.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sites/add","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}"},"summary":"Adds a site to the set of the user's sites in Search Console.","description":"Adds a site to the set of the user's sites in Search Console.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"delete":{"tags":["Sites"],"parameters":[{"name":"siteUrl","in":"path","description":"The URI of the property as defined in Search Console. **Examples:** http://www.example.com/ or sc-domain:example.com.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/webmaster-tools/v1/sites/delete","api_endpoint":"https://searchconsole.googleapis.com/webmasters/v3/sites/{siteUrl}"},"summary":"Removes a site from the set of the user's Search Console sites.","description":"Removes a site from the set of the user's Search Console sites.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/urlTestingTools/mobileFriendlyTest/run":{"post":{"tags":["Mobile Friendly Test"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://searchconsole.googleapis.com/$discovery/rest?version=v1","api_endpoint":"https://searchconsole.googleapis.com/v1/urlTestingTools/mobileFriendlyTest:run"},"summary":"Runs Mobile-Friendly Test for a given URL.","description":"Runs Mobile-Friendly Test for a given URL.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"requestScreenshot":{"type":"boolean","description":"Whether or not screenshot is requested. Default is false.","enum":[true,false]},"url":{"type":"string","description":"URL for inspection."}}},"example":{"requestScreenshot":"","url":"example-url"}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}