skip to Main Content

How to extract all "query" value from SerpApi auto-generated html file

How to extract all "query" data (keywords of coffee) from this link: https://serpapi.com/search.html?engine=google_trends&q=coffee&data_type=RELATED_QUERIES&cat=0&date=now+7-d&api_key=317da75462cab4790705a5cf8b6a9c74c9ba9f279150afb87d4b191f95d8d5de to be one column data frame in R. I didn't get the result with rvest. Regards library(rvest) allcom <- read_html("https://serpapi.com/search.html?engine=google_trends&q=coffee&data_type=RELATED_QUERIES&cat=0&date=now+7-d&api_key=317da75462cab4790705a5cf8b6a9c74c9ba9f279150afb87d4b191f95d8d5de") allcom %>% html_attr("query") [1] NA

VIEW QUESTION
Back To Top
Search