Title: | An Interface for the 'STAT Search Analytics' API |
---|---|
Description: | Pull data from the 'STAT Search Analytics' API <https://help.getstat.com/knowledgebase/api-services/>. It was developed by the Search Discovery team to help analyze keyword ranking data. |
Authors: | Ben Woodard [aut, cre], Chima Umeakunne [ctb], Search Discovery, LLC [own] (Visit SearchDiscovery.com for more information) |
Maintainer: | Ben Woodard <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.4.9000 |
Built: | 2025-02-10 03:59:08 UTC |
Source: | https://github.com/sditools/statsearchanalyticsr |
Retrieve a bulk report of all the rankings or for specific sites.
ssar_bulk_rankings( date = Sys.Date() - 1, siteid = NULL, ranktype = "highest", engines = c("google", "bing"), currentlytracked = TRUE, crawledkeywords = TRUE, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_bulk_rankings( date = Sys.Date() - 1, siteid = NULL, ranktype = "highest", engines = c("google", "bing"), currentlytracked = TRUE, crawledkeywords = TRUE, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
date |
The date being requested (required) in 'YYYY-MM-DD' format. Default is set to yesterday. |
siteid |
The site id. If not provided then all sites will be returned. Comma separated list of specific site IDs, default is all sites. |
ranktype |
This argument changes the call between getting the highest ranks for the keywords for the date with the value highest, or getting all the ranks for each engine for a keyword for a date with the value all. Defaults to highest if not provided. |
engines |
This argument lets you choose which search engines to include in the export, defaulting to Google and Bing. Engines can be passed in comma separated to get multiple. |
currentlytracked |
This argument will cause the API to ouptput only keywords which currently have tracking on at the time the API request is generated. |
crawledkeywords |
This argument causes the API to only include output for keywords that were crawled on the date argument provided. |
subdomain |
The account subdomain |
apikey |
The api key from the account |
The dataframe with all keywords ranking information for the requested date
Retrieve a bulk report using a bulk report id. Intended to be used with the get_bulk_rankings
function but can be used independently as well.
ssar_bulk_request( id = NULL, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_bulk_request( id = NULL, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
id |
Id of the bulk job #required |
subdomain |
The account subdomain |
apikey |
The api key from the account |
list of the bulk keyword ranking report for the requested ID
## Not run: ssar_bulk_request(id = {report_id}) ## End(Not run)
## Not run: ssar_bulk_request(id = {report_id}) ## End(Not run)
Retrieve a table of all the keywords in a particular site and the corresponding metadata
ssar_keywords( siteid = NULL, start = 0, results = 100, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_keywords( siteid = NULL, start = 0, results = 100, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
siteid |
The site id (required) |
start |
The default is 0 (zero indexed) |
results |
The default is 100 |
subdomain |
The account subdomain |
apikey |
The api key from the account |
A dataframe of keywords along with 29 other columns of data
## Not run: ssar_keywords(siteid = {site_id} ) #replace is your site id ## End(Not run)
## Not run: ssar_keywords(siteid = {site_id} ) #replace is your site id ## End(Not run)
Receive a list of all the projects on an account accessible through the provided api key
ssar_projects( subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_projects( subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
subdomain |
The account subdomain |
apikey |
The api key from the account |
A dataframe of available project data your authentication has access to
## Not run: projects(subdomain = Sys.getenv('SSAR_SUBDOMAIN'), apikey = Sys.getenv('SSAR_APIKEY')) ## End(Not run)
## Not run: projects(subdomain = Sys.getenv('SSAR_SUBDOMAIN'), apikey = Sys.getenv('SSAR_APIKEY')) ## End(Not run)
Retrieve a table including metadata for all the sites in a particular project
ssar_rankings( keywordid = NULL, fromdate = NULL, todate = NULL, start = 0, results = 100, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_rankings( keywordid = NULL, fromdate = NULL, todate = NULL, start = 0, results = 100, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
keywordid |
The keyword id (required) |
fromdate |
Default is 100 most recent results (optional) Format is a string YYYY-MM-DD |
todate |
Default is most recent ranking day (optional) Format is a string YYYY-MM-DD |
start |
The default is 0 (zero indexed). The starting result for paginated requests |
results |
The default is 100 |
subdomain |
The account subdomain |
apikey |
The api key from the account |
A dataframe of all rankings within a defined date range for a specific keyword
## Not run: ssar_rankings(keywordid = {keyword_id}, #replace with your keyword_id fromdate = '2021-01-01', todate = '2021-04-01') ## End(Not run)
## Not run: ssar_rankings(keywordid = {keyword_id}, #replace with your keyword_id fromdate = '2021-01-01', todate = '2021-04-01') ## End(Not run)
Retrieve a table of all the sites and metadata in a specified project
ssar_sites( projectid = NULL, start = NULL, results = 100, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_sites( projectid = NULL, start = NULL, results = 100, subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
projectid |
The project id. If not provided then all sites will be returned. |
start |
If more than |
results |
Default is 100. Max is 5000. |
subdomain |
The account subdomain |
apikey |
The api key from the account |
A table of the site information within a project
## Not run: ssar_sites(projectid = {project_id}, #replace with your project id results = 300) ## End(Not run)
## Not run: ssar_sites(projectid = {project_id}, #replace with your project id results = 300) ## End(Not run)
This function returns all ranking distribution records for Google and Bing for a site with the specified id. The maximum date range can be no greater than 31 days.
ssar_sites_ranking_dist( siteid = NULL, fromdate = as.character(Sys.Date() - 31), todate = as.character(Sys.Date() - 1), subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
ssar_sites_ranking_dist( siteid = NULL, fromdate = as.character(Sys.Date() - 31), todate = as.character(Sys.Date() - 1), subdomain = Sys.getenv("SSAR_SUBDOMAIN"), apikey = Sys.getenv("SSAR_APIKEY") )
siteid |
Required The site id. |
fromdate |
Required Character string in the 'YYYY-MM-DD' format. Default is -31 days from today since the maximum date range can be no greater than 31 days. |
todate |
Required Character string in the 'YYYY-MM-DD' format. Default is yesterday. |
subdomain |
The account subdomain |
apikey |
The api key from the account |
A table with Google, GoogleBaseRank, and Bing ranking distributions by date
## Not run: ssar_sites_ranking_dist(siteid = {site_id}, #replace is your site id fromdate = '2021-04-01', todate = '2021-05-31') ## End(Not run)
## Not run: ssar_sites_ranking_dist(siteid = {site_id}, #replace is your site id fromdate = '2021-04-01', todate = '2021-05-31') ## End(Not run)