account_api_units: View SEMRush API Units balance for a subscriber account.

Description Usage Arguments Examples

View source: R/account_api_units.R

Description

Returns the SEMRush account API Units balance. API Units are consumed when requests to the SEMRush database are made through the API. See the SEMRush API website (https://www.semrush.com/api-analytics/) for more information.

Usage

1
account_api_units(key, character_format = FALSE)

Arguments

key

string. API key assigned to a user after subscribing to SEMrush. The key is available from the account profile page.

character_format

logical. If FALSE (default), returns the unit balance as a numeric. If TRUE, value returned is a character string formatted with a "," every three digits.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##define object with your SEMRush account API key.
## Not run: 
api_key <- ""

## without formatting
account_api_units(api_key)
10000

## with formatting
account_api_units(api_key, character_format=TRUE)
"10,000"
## End(Not run)

ericvc/semRush documentation built on Aug. 7, 2020, 12:54 p.m.