MyNixOS website logo
Description

'Serpstat' API Wrapper.

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.

serpstatr

The aim of serpstatr is to provide a wrapper for the latest version of Serpstat API. The main purpose of this API is automation of common SEO and PPC tasks like keywords research and competitors analysis in Google.

All package functions names have the same structure:

  • sst_ prefix to distinguish from other packages
  • Serpstat modules prefix (for example, sa_ for search analytics)
  • API function name

How to use

  1. Get your API key. It is required in all package functions.

  2. Search analytics

Check if you have enough limits to make API calls

api_token <- Sys.getenv('SERPSTAT_API_TOKEN')
sst_sa_stats(api_token)$summary_info$left_lines

Get database ID to make requests:

sst_sa_database_info(api_token)$data

Call functions to get keywords data:

  • sst_sa_domains_info() - domain summary stats
  • sst_sa_domain_keywords() - domain keywords with stats
  • sst_sa_domain_history() - domain historical metrics
  • sst_sa_domain_top_pages() - domain top pages
  • sst_sa_domain_organic_competitors() - domain organic competitors
  • sst_sa_keywords_info() - keywords summary stats
  • sst_sa_keywords() - search Serpstat database for keywords with stats
  • sst_sa_keyword_top() - get list of URLs from SERP for a keyword
sst_sa_keywords_info(
  api_token     = api_token,
  keywords      = c('seo', 'ppc', 'serpstat'),
  se            = 'g_us',
  sort          = list(cost = 'asc'),
  return_method = 'df'
)$data
  1. Backlinks

Call functions to get the data on the backlinks:

  • sst_bl_domain_summary() - backlinks summary stats for the domain
  • sst_bl_referring_domains() - referring domains stats for the domain
sst_bl_domain_summary(
  api_token     = api_token,
  domain        = 'serpstat.com',
  search_type   = 'domain',
  return_method = 'list'
  )$data
  
  1. Rank tracker

Call functions to get the data on your rankings:

  • sst_rt_project_regions() - all regions for a project
  • sst_rt_serp_history() - search results history in search region by keyword
  • sst_rt_positions_history() - ranking history for the domain or URL in selected search region
  • sst_rt_competitors() - data on competitors in search results
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'
  )$data$keywords
  1. Audit

Call functions to audit your website for technical issues:

  • sst_au_start() - start website audit
  • sst_au_get_summary() - get website audit summary
sst_au_start(
  api_token     = api_token,
  project_id    = project_id
  )$data$reportId
  
  1. Project management

Call functions to manage your projects:

  • sst_pm_create_project() - create a new project
  • sst_pm_delete_project() - delete an existing project
  • sst_pm_list_projects() - list all projects available for the user
sst_pm_create_project(
  api_token = api_token,
  domain    = 'serpstat.com',
  name      = 'Serpstat'
  )$data$project_id

Installation

To get the current development version from GitLab:

devtools::install_gitlab('alexdanilin/serpstatr')

Issues

Send all issues on GitLab page.

Metadata

Version

0.3.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows