get_ahrefs_data: Get Data From the AHREF's

Description Usage Arguments Value Examples

Description

Get data from the AHREF's API. For more information see the online documentation: https://ahrefs.com/api/documentation.

Usage

1
2
get_ahrefs_data(target, token, from, mode, select = NULL, where = NULL,
  having = NULL, order_by = NULL, offset = 0, limit = 1000)

Arguments

target

Aim of a request: a domain, a directory or a URL

token

Authentication token

from

Table to select data from

mode

Mode of operation: exact, domain, subdomains or prefix

select

A character vector of columns to select in 'from' table.

where

"Where" condition to satisfy. Use helper function 'make_condition' or see documentation for how to build where conditions manually. Where filters before grouping.

having

"Having" condition to satisfy. Use helper function 'make_condition' or see documentation for how to build where conditions manually. Having filters after grouping.

order_by

List of columns to sort on. Use helper function 'make_order' or see documentation for how to build orders by hand.

offset

Position from which to start returning data

limit

Number of results to return

Value

An object of class 'ahrefs_api'

Examples

1
2
3
4
5
6
7
## Not run: 
ahrefs_key <- '123456789'
get_ahrefs_data('mhairihmcneill.com', ahrefs_key, from = 'ahrefs_rank', mode = 'domain')
get_ahrefs_data('mhairihmcneill.com/blog', ahrefs_key, from = 'metrics_extended', mode = 'exact')
get_ahrefs_data('mhairihmcneill.com/blog', ahrefs_key, from = 'refdomains', mode = 'prefix', limit = 10)

## End(Not run)

mhairi/ahrefs documentation built on May 22, 2019, 8:56 p.m.