| Type: | Package | 
| Title: | Interface to 'Glassdoor' API | 
| Version: | 0.9.0 | 
| Description: | Interacts with the 'Glassdoor' API https://www.glassdoor.com/developer/index.htm. Allows the user to search job statistics, employer statistics, and job progression, where 'Glassdoor' provides a breakdown of other jobs a person did after their current one. | 
| License: | GPL-2 | 
| BugReports: | https://github.com/muschellij2/glassdoor/issues | 
| Imports: | httr | 
| Suggests: | covr, knitr, rmarkdown, testthat | 
| VignetteBuilder: | knitr | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.3.2 | 
| Depends: | R (≥ 3.1) | 
| NeedsCompilation: | no | 
| Packaged: | 2025-04-01 18:12:28 UTC; johnmuschelli | 
| Author: | John Muschelli [aut, cre] | 
| Maintainer: | John Muschelli <muschellij2@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2025-04-01 22:50:02 UTC | 
General Glassdoor API function
Description
General Glassdoor API function
Usage
gd_api(
  query = NULL,
  action = NULL,
  agent = gd_user_agent(),
  version = 1,
  format = "json",
  url = gd_url(),
  pid = gd_pid(),
  pat = gd_pat(),
  ip_address = NULL,
  add_query = NULL,
  ...
)
Arguments
query | 
 Additional options to pass to the query other than those specified here  | 
action | 
 The particular API call that you would like to make  | 
agent | 
 The User-Agent (browser) of the end user to whom the API results will be shown. Note that you can can obtain this from the "User-Agent" HTTP request header from the end-user  | 
version | 
 The API version. The current version is 1 except for jobs, which is currently version 1.1  | 
format | 
 Either   | 
url | 
 Glassdoor RESTful API URL  | 
pid | 
 Your partner id, as assigned by Glassdoor  | 
pat | 
 Your partner key, as assigned by Glassdoor  | 
ip_address | 
 The IP address of the end user to whom the API results will be shown  | 
add_query | 
 Additional options to pass to the query other than those specified here (named list)  | 
... | 
 Additional options to send to   | 
Value
A list of class gd_api
Examples
if (have_gd_pid() && have_gd_pat()) {
res = gd_api(
action = "employers",
other = NULL,
  version = 1,
format = "json",
query =  "pharmaceuticals")
res = gd_api(
action = "employers",
other = NULL,
 version = 1,
format = "json",
query = "pharmaceuticals", config = list())
}
Glassdoor Company Search
Description
Glassdoor Company Search
Usage
gd_company(
  query = NULL,
  ...,
  location = NULL,
  city = NULL,
  state = NULL,
  country = NULL,
  page_number = NULL,
  page_size = NULL
)
gd_employer(
  query = NULL,
  ...,
  location = NULL,
  city = NULL,
  state = NULL,
  country = NULL,
  page_number = NULL,
  page_size = NULL
)
gd_company_df(...)
gd_employer_df(...)
Arguments
query | 
 Additional options to pass to the query other than those specified here  | 
... | 
 arguments to pass to   | 
location | 
 Scope the search to a specific location by specifying it here - city, state, or country.  | 
city | 
 Scope the search to a specific city by specifying it here.  | 
state | 
 Scope the search to a specific state by specifying it here.  | 
country | 
 Scope the search to a specific country by specifying it here.  | 
page_number | 
 Page number to retrieve. Default is 1.  | 
page_size | 
 Page size, i.e. the number of jobs returned on each page of results. Default is 20.  | 
Examples
if (have_gd_tokens()) {
res = gd_company_df("walmart")
head(res[, c("id", "name")])
res = gd_company_df("Target")
res = gd_company("Dropbox")
}
Glassdoor Job Stats
Description
Glassdoor Job Stats
Usage
gd_job_stats(
  ...,
  query = NULL,
  employer = NULL,
  location = NULL,
  city = NULL,
  state = NULL,
  country = NULL,
  fromAge = NULL,
  jobType = NULL,
  minRating = NULL,
  radius = NULL,
  job_title = NULL,
  job_category = NULL,
  returnCities = NULL,
  returnStates = NULL,
  returnJobTitles = NULL,
  returnEmployers = NULL,
  admLevelRequested = NULL
)
Arguments
... | 
 arguments to pass to   | 
query | 
 Additional options to pass to the query other than those specified here  | 
employer | 
 Scope the search to a specific employer by specifying the name here.  | 
location | 
 Scope the search to a specific location by specifying it here - city, state, or country.  | 
city | 
 Scope the search to a specific city by specifying it here.  | 
state | 
 Scope the search to a specific state by specifying it here.  | 
country | 
 Scope the search to a specific country by specifying it here.  | 
fromAge | 
 Scope the search to jobs that are less than X days old (-1 = show all jobs (default), 1 = 1 day old, 7 = 1 week old, 14 = 2 weeks old, etc.)  | 
jobType | 
 Scope the search to certain job types. Valid values are all
(default),   | 
minRating | 
 Scope the search to jobs of companies
with rating >=   | 
radius | 
 Scope the search to jobs within a certain radius, in miles, of the location specified.  | 
job_title | 
 Scope the search to a specific job title by specifying it here.  | 
job_category | 
 Job category id to scope the search to - see the Job Category table below - note you must pass the id. This can be a comma separated list of ids if you desire to select more than one category.  | 
returnCities | 
 Results will include geographical data (job counts) broken down by city.  | 
returnStates | 
 Results will include geographical data (job counts,
score) broken down by the type of geographical district specified in
parameter   | 
returnJobTitles | 
 Results will include job data broken down by job title.  | 
returnEmployers | 
 Results will include job data broken down by employer.  | 
admLevelRequested | 
 Geographic district type requested when
  | 
Examples
if (have_gd_tokens()) {
paste0("returnStates=true&admLevelRequested=1")
res = gd_job_stats(returnStates = TRUE, admLevelRequested = 1)
}
Glassdoor Partner ID
Description
Glassdoor Partner ID
Usage
gd_pid(token = NULL, error = TRUE)
gd_pat(token = NULL, error = TRUE)
have_gd_pid(token = NULL)
have_gd_pat(token = NULL)
have_gd_tokens()
Arguments
token | 
 Partner ID or Authentication token  | 
error | 
 Should the function error if no token specified?  | 
Value
A vector of class character
Examples
if (have_gd_pid()) {
gd_pid()
}
Glassdoor Company Search
Description
Glassdoor Company Search
Usage
gd_review(employer_id, ..., page_number = NULL, page_size = NULL, query = NULL)
Arguments
employer_id | 
 Glassdoor ID for the company, can be accessed using
  | 
... | 
 arguments to pass to   | 
page_number | 
 Page number to retrieve. Default is 1.  | 
page_size | 
 Page size, i.e. the number of jobs returned on each page of results. Default is 20.  | 
query | 
 Additional options to pass to the query other than those specified here  | 
Examples
if (have_gd_tokens()) {
res = gd_review(employer_id = 715) # walmart
}
Glassdoor URL
Description
Glassdoor URL
Usage
gd_url()
Value
Object of class character
Examples
gd_url()
Glassdoor User Agent
Description
Glassdoor User Agent
Usage
gd_user_agent()
Value
Character vector
Examples
gd_user_agent()
Get IP Address
Description
Get IP Address
Usage
get_ip(agent = gd_user_agent())
Arguments
agent | 
 User Agent for Header  | 
Value
Character Vector of IP
Note
Inspired by https://github.com/gregce/ipify/blob/master/R/ipify.R
Examples
get_ip()
Results of a Glassdoor object
Description
Calculates the results from Glassdoor object
Usage
results(gd, ...)
## Default S3 method:
results(gd, ...)
## S3 method for class 'gd_api'
results(gd, ...)
## S3 method for class 'gd_job_prog'
results(gd, ...)
Arguments
gd | 
 an object for which we want the results, the output from a Glassdoor call  | 
... | 
 Any additional arguments to be passed to   | 
Value
A class of gd_job_prog will return a
list of progression_table and job_info.
Examples
if (have_gd_tokens()) {
   gd = gd_company("walmart")
   res = results(gd)
}