#install.packages(“httr”) #install.packages(“jsonlite”) library(httr) library(jsonlite) library(dplyr)
api_key <- authenticate( user = “561a4932-c798-443c-a06f-3848f801efb3”, password = ““, type =”basic”)
responses <- list()
seq(from = 1, to = 1001, by = 100) # Create a sequence going up by 100
for (i in seq(from = 1, to = 1001, by = 100)) {
# Construct the API request URL with the i value and the API key
req_url <- paste0(url, “&resultsToSkip=”, i)
# Send the API request using the GET() function from the httr package
response <- GET(req_url, api_key)
# Parse the JSON response using the fromJSON() function from the jsonlite package
response_json <- fromJSON(content(response, “text”))
# Store the response in the list
responses[[i]] <- response_json$results
}
View(responses[[1]])
View(responses[[2]])
View(responses[[101]])
jobs <- bind_rows(responses)