Title: | 'Serpstat' API Wrapper |
---|---|
Description: | The primary goal of 'Serpstat' API <https://serpstat.com/api/> is to reduce manual SEO (search engine optimization) and PPC (pay-per-click) tasks. You can automate your keywords research or competitors analysis with this API wrapper. |
Authors: | Alex Danilin [aut, cre] |
Maintainer: | Alex Danilin <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.0 |
Built: | 2025-02-13 04:42:42 UTC |
Source: | https://github.com/cran/serpstatr |
Returns the basic stats for the finished audit returns, including number of checked pages, issues by priority, domain optimization score.
sst_au_get_summary(api_token, report_id = NULL)
sst_au_get_summary(api_token, report_id = NULL)
api_token |
(required) Serpstat API token from your profile. |
report_id |
(required) ID of the audit report to get data from. |
Returns the basic metrics for audited website.
Check all the values for request and response fields here.
0.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_au_get_summary( api_token = api_key, report_id = report_id )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_au_get_summary( api_token = api_key, report_id = report_id )$data ## End(Not run)
Starts a project website audit with the current audit settings. Uses default audit settings if no settings were changed.
sst_au_start(api_token, project_id = NULL)
sst_au_start(api_token, project_id = NULL)
api_token |
(required) Serpstat API token from your profile. |
project_id |
(required) ID of the project in Serpstat. |
Returns the ID of the audit report.
Check all the values for request and response fields here.
1 audit credit for each checked page.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_au_start( api_token = api_token, project_id = 12345 )$data$reportId ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_au_start( api_token = api_token, project_id = 12345 )$data$reportId ## End(Not run)
Returns the overview of the backlinks profile for the domain.
sst_bl_domain_summary( api_token, domain, search_type = "domain", return_method = "list" )
sst_bl_domain_summary( api_token, domain, search_type = "domain", return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) A domain name to analyze. |
search_type |
(optional) Default value is 'domain' for domain only (site.com). See API docs for more details. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns aggregated backlinks data for the domain.
Check all the values for request and response fields here.
1 per request.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_bl_domain_summary( api_token = api_token, domain = 'serpstat.com', search_type = 'domain', return_method = 'list' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_bl_domain_summary( api_token = api_token, domain = 'serpstat.com', search_type = 'domain', return_method = 'list' )$data ## End(Not run)
Returns the list of referring domains with main backlinks metrics for each domain.
sst_bl_referring_domains( api_token, domain, search_type = "domain", page = 1, size = 100, sort = "domain_rank", order = "desc", filter = NULL, return_method = "list" )
sst_bl_referring_domains( api_token, domain, search_type = "domain", page = 1, size = 100, sort = "domain_rank", order = "desc", filter = NULL, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) A domain name to analyze. |
search_type |
(required) Default value is 'domain' for domain data only (site.com). See API docs for more details. |
page |
(optional) Response page number if there are many pages in response. Default is 1. |
size |
(optional) Response page size. Default is 100. |
sort |
(optional) A field to sort the response. Default is 'domain_rank'. See API docs for more details. |
order |
(optional) The order of sorting. Default is 'desc' for descending order. See API docs for more details. |
filter |
(optional) The nested list of filtering options. See API docs for more details. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns aggregated backlinks data for each referring domain.
Check all the values for request and response fields here.
1 per each domain in response.
You can sort the response using sort
argument. The sorting order is
defined using order
argument.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_bl_referring_domains( api_token = api_token, domain = 'serpstat.com', page = 1, size = 100, sort = 'domain_rank', order = 'desc', filter = NULL, return_method = 'list' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_bl_referring_domains( api_token = api_token, domain = 'serpstat.com', page = 1, size = 100, sort = 'domain_rank', order = 'desc', filter = NULL, return_method = 'list' )$data ## End(Not run)
Make a request to Serpstat API endpoint
sst_call_api_method(api_token, api_method, api_params = NULL)
sst_call_api_method(api_token, api_method, api_params = NULL)
api_token |
Serpstat API token from the profile page. |
api_method |
Internal name of API method. |
api_params |
A list of API parameters used by api_method. More information about parameters in the official docs. |
The list with a response data.
api_params <- list( query = 'serpstat.com', page = 1, size = 5 ) tryCatch({ serpstatr:::sst_call_api_method( api_token = Sys.getenv('SERPSTAT_API_TOKEN'), api_method = 'SerpstatLimitsProcedure.getStats', api_params = api_params ) })
api_params <- list( query = 'serpstat.com', page = 1, size = 5 ) tryCatch({ serpstatr:::sst_call_api_method( api_token = Sys.getenv('SERPSTAT_API_TOKEN'), api_method = 'SerpstatLimitsProcedure.getStats', api_params = api_params ) })
API response might contain nested lists with different number of elements. This function fills missing elements and combine lists to a data.frame.
sst_lists_to_df(lists, fill = NA)
sst_lists_to_df(lists, fill = NA)
lists |
- a list of nested lists with different number of elements |
fill |
- a value to fill missing values in lists |
A data.frame with all missing values filed with specified value.
sst_lists_to_df( lists = list( first_list = list(a = 1, b = 2), second_list = list(a = 2, c = 3) ), fill = 'empty' )
sst_lists_to_df( lists = list( first_list = list(a = 1, b = 2), second_list = list(a = 2, c = 3) ), fill = 'empty' )
Creates a new project in Serpstat.
sst_pm_create_project(api_token, domain, name, groups = NULL)
sst_pm_create_project(api_token, domain, name, groups = NULL)
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) Domain to get data for. |
name |
(required) The name of the project. Can be different from the domain. |
groups |
(optional) A list of project groups the project should be added to. |
Returns the project ID for the created project.
Check all the values for request and response fields here.
1 project credit.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_pm_create_project( api_token = api_token, domain = 'serpstat.com', name = 'Serpstat' )$data$project_id ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_pm_create_project( api_token = api_token, domain = 'serpstat.com', name = 'Serpstat' )$data$project_id ## End(Not run)
Deletes the existing project in Serpstat by project ID.
sst_pm_delete_project(api_token, project_id = NULL)
sst_pm_delete_project(api_token, project_id = NULL)
api_token |
(required) Serpstat API token from your profile. |
project_id |
(required) ID of the project in Serpstat. |
Returns the state of the deletion operation.
Check all the values for request and response fields here.
returns 1 project credit.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_pm_delete_project( api_token = api_token, project_id = 12345 ) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_pm_delete_project( api_token = api_token, project_id = 12345 ) ## End(Not run)
Gets a list of existing projects available for the users with their basic information.
sst_pm_list_projects(api_token, page = 1, size = 100, return_method = "list")
sst_pm_list_projects(api_token, page = 1, size = 100, return_method = "list")
api_token |
(required) Serpstat API token from your profile. |
page |
(optional) Response page number if there are many pages in response. |
size |
(optional) Response page size. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns basic information on all the projects.
Check all the values for request and response fields here.
0.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_pm_list_projects( api_token = api_token, page = 2, size = 10 ) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_pm_list_projects( api_token = api_token, page = 2, size = 10 ) ## End(Not run)
Every API call returns a JSON object. This object is transformed to a list. Depending on return_method parameter the data element of this list will be a list or data.frame.
sst_return_check(response_content, return_method)
sst_return_check(response_content, return_method)
response_content |
The result of |
return_method |
Accepted values are 'list' to return data object as list or 'df' to return data object as data.frame. |
response_content with a data object as list or data.frame.
This method method returns the competing in top20 search results domains that rank for at least two keywords that are added the project.
sst_rt_competitors( api_token, project_id, region_id, date_from = Sys.Date() - 8, date_to = Sys.Date() - 1, domains = NULL, sort = "sum_traffic", sort_range = "top1", order = "desc", page = 1, size = 100, return_method = "list" )
sst_rt_competitors( api_token, project_id, region_id, date_from = Sys.Date() - 8, date_to = Sys.Date() - 1, domains = NULL, sort = "sum_traffic", sort_range = "top1", order = "desc", page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
project_id |
(required) The ID of your project in Serpstat. You can find this ID in the URL of any rank tracker report. As an example, in https://serpstat.com/rank-tracker/keywords/12345/positions?get_params the ID would be 12345. |
region_id |
(required) The ID of a region returned by
|
date_from |
(optional) The date string in 'YYYY-MM-DD' format to specify the initial date of retrieved data. Default value is current date minus 8 days. |
date_to |
(optional) The date string in 'YYYY-MM-DD' format to specify the final date of retrieved data. Must not exceed date_from + 30 days. Default value is yesterday. |
domains |
(optional) A vector of domain names for which the data should be retrieved. By default the data is retrieved for all domains that rank for at least two keywords that are added to the project. |
sort |
(optional) Must be one of 'sum_traffic' (default, domain search traffic distribution), 'keywords_count' (number of keywords), 'avg_position' (average domain position), 'position_ranges' (ranges of positions), 'ads_count' (number of ads in search engine results). |
sort_range |
(optional) The subcategory of ranges of positions to sort by. Must be one of 'top1', 'top3', 'top5', 'top10', 'top20', 'top101' to sort by the number of keywords in specific positions range; or 'keywords_count_top', 'keywords_count_bottom' to sort by the number of keywords in search ads blocks; or 'avg_position_top', 'avg_position_bottom' to sort by the average position in search ads blocks. |
order |
(optional) The sorting order. Must be one of string 'desc' (default) for descending sorting or 'asc' for ascending sorting. |
page |
(optional) Response page number if there are many pages in response. The default value is 1. |
size |
(optional) Response page size. Must be one of 20, 50, 100, 200, 500.The default value is 100. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns traffic and keywords distributions, average positions of the domains by date.
Check all the values for request and response fields here.
0
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 region_id <- sst_rt_competitors( api_token = api_token, project_id = project_id )$data$regions[[1]]$id sst_rt_competitors( api_token = api_token, project_id = project_id, region_id = region_id, date_from = '2020-12-01', date_to = '2020-12-30', domains = c('serpstat.com', 'serpstatbot.com'), sort = 'sum_traffic', sort_range = 'top1', order = 'desc', page = 1, size = 20, return_method = 'list' ) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 region_id <- sst_rt_competitors( api_token = api_token, project_id = project_id )$data$regions[[1]]$id sst_rt_competitors( api_token = api_token, project_id = project_id, region_id = region_id, date_from = '2020-12-01', date_to = '2020-12-30', domains = c('serpstat.com', 'serpstatbot.com'), sort = 'sum_traffic', sort_range = 'top1', order = 'desc', page = 1, size = 20, return_method = 'list' ) ## End(Not run)
This method method returns the rankings for specified domain is selected search region.
sst_rt_positions_history( api_token, project_id, region_id, date_from = Sys.Date() - 8, date_to = Sys.Date() - 1, keywords = NULL, url = NULL, sort = "keyword", order = "desc", page = 1, size = 100, return_method = "list" )
sst_rt_positions_history( api_token, project_id, region_id, date_from = Sys.Date() - 8, date_to = Sys.Date() - 1, keywords = NULL, url = NULL, sort = "keyword", order = "desc", page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
project_id |
(required) The ID of your project in Serpstat. You can find this ID in the URL of any rank tracker report. As an example, in https://serpstat.com/rank-tracker/keywords/12345/positions?get_params the ID would be 12345. |
region_id |
(required) The ID of a region returned by
|
date_from |
(optional) The date string in 'YYYY-MM-DD' format to specify the initial date of retrieved data. Default value is current date minus 8 days. |
date_to |
(optional) The date string in 'YYYY-MM-DD' format to specify the final date of retrieved data. Must not exceed date_from + 30 days. Default is yesterday. |
keywords |
(optional) A vector of keywords for witch the data should be retrieved. Maximum 1000 keywords per request. By default all the data for all keywords in the project is returned. |
url |
(optional) The domain name (e.g. domain.com) or web page address (e.g. https://domain.com/page) to get the data for. By default the results are returned for the projects' domain name. |
sort |
(optional) Must be one of 'keyword' (default) to sort the results alphabetically or 'date' to sort the results by date. |
order |
(optional) The sorting order. Must be one of string 'desc' (default) for descending sorting or 'asc' for ascending sorting. |
page |
(optional) Response page number if there are many pages in response. The default value is 1. |
size |
(optional) Response page size. Must be one of 20, 50, 100, 200, 500.The default value is 100. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns positions of selected domain in search engine results in selected region with corresponding URLs for these positions.
Check all the values for request and response fields here.
0
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 region_id <- sst_rt_project_regions( api_token = api_token, project_id = project_id )$data$regions[[1]]$id sst_rt_positions_history( api_token = api_token, project_id = project_id, region_id = region_id, date_from = '2020-12-01', date_to = '2020-12-30', keywords = c('seo', 'ppc', 'serpstat'), url = 'serpstat.com', sort = 'keyword', order = 'desc', page = 1, size = 100, return_method = 'list' ) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 region_id <- sst_rt_project_regions( api_token = api_token, project_id = project_id )$data$regions[[1]]$id sst_rt_positions_history( api_token = api_token, project_id = project_id, region_id = region_id, date_from = '2020-12-01', date_to = '2020-12-30', keywords = c('seo', 'ppc', 'serpstat'), url = 'serpstat.com', sort = 'keyword', order = 'desc', page = 1, size = 100, return_method = 'list' ) ## End(Not run)
In Serpstat you are able to track ranking of your website in multiple regions. This method returns all the regions in your Serpstat project. You will need the results of this method to get rankings in selected region.
sst_rt_project_regions(api_token, project_id, return_method = "list")
sst_rt_project_regions(api_token, project_id, return_method = "list")
api_token |
(required) Serpstat API token from your profile. |
project_id |
(required) The ID of your project in Serpstat. You can find this ID in the URL of any rank tracker report. As an example, in https://serpstat.com/rank-tracker/keywords/12345/positions?get_params the ID would be 12345. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns the regions of the project with their ID, state (active or not) and other region attributes.
Check all the values for request and response fields here.
0
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 sst_rt_project_regions(api_token = api_token, project_id = project_id) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 sst_rt_project_regions(api_token = api_token, project_id = project_id) ## End(Not run)
This method returns top 100 search results in Google.
sst_rt_serp_history( api_token, project_id, region_id, date_from = Sys.Date() - 8, date_to = Sys.Date() - 1, keywords = NULL, sort = "keyword", order = "desc", page = 1, size = 100, return_method = "list" )
sst_rt_serp_history( api_token, project_id, region_id, date_from = Sys.Date() - 8, date_to = Sys.Date() - 1, keywords = NULL, sort = "keyword", order = "desc", page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
project_id |
(required) The ID of your project in Serpstat. You can find this ID in the URL of any rank tracker report. As an example, in https://serpstat.com/rank-tracker/keywords/12345/positions?get_params the ID would be 12345. |
region_id |
(required) The ID of a region returned by
|
date_from |
(optional) The date string in 'YYYY-MM-DD' format to specify the initial date of retrieved data. Default value is current date minus 8 days. |
date_to |
(optional) The date string in 'YYYY-MM-DD' format to specify the final date of retrieved data. Must not exceed date_from + 30 days. Default is yesterday. |
keywords |
(optional) A vector of keywords for witch the data should be retrieved. Maximum 1000 keywords per request. By default all the data for all keywords in the project is returned. |
sort |
(optional) Must be one of 'keyword' (default) to sort the results alphabetically or 'date' to sort the results by date. |
order |
(optional) The sorting order. Must be one of string 'desc' (default) for descending sorting or 'asc' for ascending sorting. |
page |
(optional) Response page number if there are many pages in response. The default value is 1. |
size |
(optional) Response page size. Must be one of 20, 50, 100, 200, 500.The default value is 100. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns the search engine results for specific dates and region including positions and URLs.
Check all the values for request and response fields here.
0
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 region_id <- sst_rt_project_regions( api_token = api_token, project_id = project_id )$data$regions[[1]]$id sst_rt_serp_history( api_token = api_token, project_id = project_id, region_id = region_id, date_from = '2020-12-01', date_to = '2020-12-30', keywords = c('seo', 'ppc', 'serpstat'), sort = 'keyword', order = 'desc', page = 1, size = 100, return_method = 'list' ) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') project_id <- 12345 region_id <- sst_rt_project_regions( api_token = api_token, project_id = project_id )$data$regions[[1]]$id sst_rt_serp_history( api_token = api_token, project_id = project_id, region_id = region_id, date_from = '2020-12-01', date_to = '2020-12-30', keywords = c('seo', 'ppc', 'serpstat'), sort = 'keyword', order = 'desc', page = 1, size = 100, return_method = 'list' ) ## End(Not run)
In every request to get data from search analytics API you must set se parameter to specify from what country do you want to get the data. This method returns all acceptable values for se parameter with corresponding country names.
sst_sa_database_info(api_token, return_method = "list")
sst_sa_database_info(api_token, return_method = "list")
api_token |
(required) Serpstat API token from your profile. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns country name, se parameter value and local search engine domain name for each country.
Check all the values for request and response fields here.
0
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_database_info(api_token)$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_database_info(api_token)$data ## End(Not run)
Returns historical metrics for the domain with about two weeks between measurements.
sst_sa_domain_history( api_token, domain, se, sort = NULL, filters = NULL, page = 1, size = 100, during_all_time = TRUE, return_method = "list" )
sst_sa_domain_history( api_token, domain, se, sort = NULL, filters = NULL, page = 1, size = 100, during_all_time = TRUE, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) Domain to get data for. |
se |
(required) Search engine alias (db_name) returned by
|
sort |
(optional) A field to sort the response. See Sorting for more details. |
filters |
(optional) A list of filtering options. See Filtering for more details. |
page |
(optional) Response page number if there are many pages in response. |
size |
(optional) Response page size. |
during_all_time |
(optional) TRUE (default) for all the history, FALSE for year-to-date data. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns a number of metrics for each date for the domain.
Check all the values for request and response fields here.
1 per date in the response.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
To filter the results you can use filters
argument. It must be a
list of named elements. The name of the element must match one of the
filtering parameters. See API docs for more details. For example,
filters = list(queries_from = 0, queries_to = 10)
would narrow
the results to include only the keywords that have a search volume
between 0 and 10.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_history( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(date = 'desc'), filters = list(traff_from = 20000), page = 2, size = 10, return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_history( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(date = 'desc'), filters = list(traff_from = 20000), page = 2, size = 10, return_method = 'df' )$data ## End(Not run)
Returns up to 60 000 organic keywords from selected region for the domain with a number of metrics for each keyword.
sst_sa_domain_keywords( api_token, domain, se, url = NULL, keywords = NULL, minusKeywords = NULL, sort = NULL, filters = NULL, page = 1, size = 100, return_method = "list" )
sst_sa_domain_keywords( api_token, domain, se, url = NULL, keywords = NULL, minusKeywords = NULL, sort = NULL, filters = NULL, page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) Domain to get data for. |
se |
(required) Search engine alias (db_name) returned by
|
url |
(optional) Get the results for this URL only. |
keywords |
(optional) A vector of words. Keywords in response will contain these words |
minusKeywords |
(optional) A vector of words. Keywords in response will not contain these words. |
sort |
(optional) A field to sort the response. See Sorting for more details. |
filters |
(optional) A list of filtering options. See Filtering for more details. |
page |
(optional) Response page number if there are many pages in response. |
size |
(optional) Response page size. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns a number of metrics for each keyword.
Check all the values for request and response fields here.
1 per keyword in response.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
To filter the results you can use filters
argument. It must be a
list of named elements. The name of the element must match one of the
filtering parameters. See API docs for more details. For example,
filters = list(queries_from = 0, queries_to = 10)
would narrow
the results to include only the keywords that have a search volume
between 0 and 10.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_keywords( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(keyword_length = 'desc'), url = 'https://serpstat.com/', keywords = list('google'), minusKeywords = list('download'), filters = list(queries_from = 0, queries_to = 10), page = 2, size = 10, return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_keywords( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(keyword_length = 'desc'), url = 'https://serpstat.com/', keywords = list('google'), minusKeywords = list('download'), filters = list(queries_from = 0, queries_to = 10), page = 2, size = 10, return_method = 'df' )$data ## End(Not run)
Returns organic competitors for the domain with their key metrics.
sst_sa_domain_organic_competitors( api_token, domain, se, sort = NULL, page = 1, size = 100, return_method = "list" )
sst_sa_domain_organic_competitors( api_token, domain, se, sort = NULL, page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) Domain to get data for. |
se |
(required) Search engine alias (db_name) returned by
|
sort |
(optional) A field to sort the response. See Sorting for more details. |
page |
(optional) Response page number if there are many pages in response. |
size |
(optional) Response page size. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns a number of metrics for each organic competitor.
Check all the values for request and response fields here.
1 per returned page.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
To filter the results you can use filters
argument. It must be a
list of named elements. The name of the element must match one of the
filtering parameters. See API docs for more details. For example,
filters = list(queries_from = 0, queries_to = 10)
would narrow
the results to include only the keywords that have a search volume
between 0 and 10.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_organic_competitors( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(relevance = 'desc'), page = 2, size = 20, return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_organic_competitors( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(relevance = 'desc'), page = 2, size = 20, return_method = 'df' )$data ## End(Not run)
Returns the number of domain pages with the biggest potential traffic, number of keywords, and Facebook shares.
sst_sa_domain_top_pages( api_token, domain, se, sort = NULL, filters = NULL, page = 1, size = 100, return_method = "list" )
sst_sa_domain_top_pages( api_token, domain, se, sort = NULL, filters = NULL, page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domain |
(required) Domain to get data for. |
se |
(required) Search engine alias (db_name) returned by
|
sort |
(optional) A field to sort the response. See Sorting for more details. |
filters |
(optional) A list of filtering options. See Filtering for more details. |
page |
(optional) Response page number if there are many pages in response. |
size |
(optional) Response page size. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns domain top pages with their metrics.
Check all the values for request and response fields here.
1 per returned page.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
To filter the results you can use filters
argument. It must be a
list of named elements. The name of the element must match one of the
filtering parameters. See API docs for more details. For example,
filters = list(queries_from = 0, queries_to = 10)
would narrow
the results to include only the keywords that have a search volume
between 0 and 10.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_top_pages( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(organic_keywords = 'desc'), filters = list(url_contain = 'blog'), page = 2, size = 50, return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domain_top_pages( api_token = api_token, domain = 'serpstat.com', se = 'g_us', sort = list(organic_keywords = 'desc'), filters = list(url_contain = 'blog'), page = 2, size = 50, return_method = 'df' )$data ## End(Not run)
Returns the number of keywords for each domain in SEO and PPC, online visibility and other metrics.
sst_sa_domains_info( api_token, domains, se, sort = NULL, return_method = "list" )
sst_sa_domains_info( api_token, domains, se, sort = NULL, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
domains |
(required) A vector of domain names to analyze. |
se |
(required) Search engine alias (db_name) returned by
|
sort |
(optional) A field to sort the response. See Sorting for more details. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns aggregated stats for each domain.
Check all the values for request and response fields here.
1 per domain in request.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domains_info( api_token = api_token, domains = c('amazon.com', 'ebay.com'), se = 'g_us', return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_domains_info( api_token = api_token, domains = c('amazon.com', 'ebay.com'), se = 'g_us', return_method = 'df' )$data ## End(Not run)
Returns a list of results (URLs) from search engine results page (SERP) including organic results, paid results and different types of SERP features.
sst_sa_keyword_top(api_token, keyword, se, top_size = 100)
sst_sa_keyword_top(api_token, keyword, se, top_size = 100)
api_token |
(required) Serpstat API token from your profile. |
keyword |
(required) A keyword to search for. |
se |
(required) Search engine alias (db_name) returned by
|
top_size |
(optional) Set the number of URLs to get in response. |
Returns a list with the data about search engine results page for the keyword.
Check all the values for request and response fields here.
1 per URL in response.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_keyword_top( api_token = api_token, keyword = 'serpstat', se = 'g_us', top_size = 10 ) ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_keyword_top( api_token = api_token, keyword = 'serpstat', se = 'g_us', top_size = 10 ) ## End(Not run)
A full-text search to find all the keywords that match the queried term with a number of metrics for each keyword like search volume, CPC and competition level.
sst_sa_keywords( api_token, keyword, se, minusKeywords = NULL, sort = NULL, filters = NULL, page = 1, size = 100, return_method = "list" )
sst_sa_keywords( api_token, keyword, se, minusKeywords = NULL, sort = NULL, filters = NULL, page = 1, size = 100, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
keyword |
(required) A keyword to search for. |
se |
(required) Search engine alias (db_name) returned by
|
minusKeywords |
(optional) A vector of words. Keywords in response will not contain these words. |
sort |
(optional) A field to sort the response. See Sorting for more details. |
filters |
(optional) A list of filtering options. See Filtering for more details. |
page |
(optional) Response page number if there are many pages in response. |
size |
(optional) Response page size. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns a number of metrics for each keyword.
Check all the values for request and response fields here.
1 per keyword in response.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
To filter the results you can use filters
argument. It must be a
list of named elements. The name of the element must match one of the
filtering parameters. See API docs for more details. For example,
filters = list(queries_from = 0, queries_to = 10)
would narrow
the results to include only the keywords that have a search volume
between 0 and 10.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_keywords( api_token = api_token, keyword = 'serpstat', se = 'g_us', minusKeywords = c('free'), sort = list(keyword_length = 'asc'), page = 2, size = 10, return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_keywords( api_token = api_token, keyword = 'serpstat', se = 'g_us', minusKeywords = c('free'), sort = list(keyword_length = 'asc'), page = 2, size = 10, return_method = 'df' )$data ## End(Not run)
Returns a number of metrics for each keyword like search volume, CPC and competition level.
sst_sa_keywords_info( api_token, keywords, se, sort = NULL, return_method = "list" )
sst_sa_keywords_info( api_token, keywords, se, sort = NULL, return_method = "list" )
api_token |
(required) Serpstat API token from your profile. |
keywords |
(required) A vector of keywords to analyze. |
se |
(required) Search engine alias (db_name) returned by
|
sort |
(optional) A field to sort the response. See Sorting for more details. |
return_method |
(optional) Accepted values are 'list' (default) to return data object as list or 'df' to return data object as data.frame. |
Returns a number of metrics for each keyword.
Check all the values for request and response fields here.
1 per keyword in request.
You can sort the response using sort
argument. It must be a list
with a single named element. The name of the element must match one of
parameters in response. The value of the element must be asc
for
ascending order and desc
for descending order. For example,
sort = list(ads = 'desc')
would sort the response by ads
parameter in descending order.
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_keywords_info( api_token = api_token, keywords = c('seo', 'ppc', 'serpstat'), se = 'g_us', sort = list(cost = 'asc'), return_method = 'df' )$data ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_keywords_info( api_token = api_token, keywords = c('seo', 'ppc', 'serpstat'), se = 'g_us', sort = list(cost = 'asc'), return_method = 'df' )$data ## End(Not run)
With most API request you spend some amount of API rows. The total amount of API rows available for you is based on your plan. Use this method to control the amount of API rows left.
sst_sa_stats(api_token)
sst_sa_stats(api_token)
api_token |
(required) Serpstat API token from your profile. |
Returns a number of API rows left. Also returns some additional information about user and Serpstat plugin limits.
0
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_stats(api_token)$summary_info$left_lines ## End(Not run)
## Not run: api_token <- Sys.getenv('SERPSTAT_API_TOKEN') sst_sa_stats(api_token)$summary_info$left_lines ## End(Not run)