MarkEdmondson1234 / searchConsoleR

R interface with Google Search Console API v3, including Search Analytics.
http://code.markedmondson.me/searchConsoleR/
Other
114 stars 41 forks source link

Add inspection API #73

Open MarkEdmondson1234 opened 2 years ago

MarkEdmondson1234 commented 2 years ago

As per https://developers.google.com/webmaster-tools/v1/urlInspection.index/inspect

MarkEdmondson1234 commented 2 years ago

In now:

# siteUrl parameter has to be one of these
list_websites()

# get a URL from your website
inspection("https://code.markedmondson.me/searchConsoleR/",
           "sc-domain:code.markedmondson.me")

Example output

==SearchConsoleInspectionResult==
inspectionResultLink:  https://search.google.com/search-console/inspect?resource_id=sc-domain:code.markedmondson.me&id=RP6Q-GuAr_CKJ5hvsOj2QA&utm_medium=link&utm_source=api
===indexStatusResult===
$verdict
[1] "PASS"

$coverageState
[1] "Indexed, not submitted in sitemap"

$robotsTxtState
[1] "ALLOWED"

$indexingState
[1] "INDEXING_ALLOWED"

$lastCrawlTime
[1] "2022-01-24 22:24:14 UTC"

$pageFetchState
[1] "SUCCESSFUL"

$googleCanonical
[1] "https://code.markedmondson.me/searchConsoleR/"

$referringUrls
[1] "https://www.zldoty.com/feed/"

$crawledAs
[1] "MOBILE"

===MobileUsabilityResult===
$verdict
[1] "PASS"
softplus commented 2 years ago

Well, this is excellent.

MarkEdmondson1234 commented 2 years ago

Thanks John!