Why am I having a problem downloading patent data with "patentsview" in R

142 views Asked by At

I am trying to fetch patent data with the "patentsview" package in R but I am always getting an error and I couldn't find the solution anywhere. Here's my code -

# Load library
library(patentsview)

# Write query
query <- with_qfuns(
  and(
    begins(cpc_subgroup_id = 'G06N'),
    gte(patent_year = 2020)
  )
)

# Create a list of fields
# get_fields(endpoint = "patents")

# Needed Fields
fields <- c(
  "patent_id",
  "patent_title",
  "patent_abstract",
  "patent_date"
)

# Send an HTTP request to the PatentsView API to get the data
pv_res <- search_pv(query = query, fields = fields, all_pages = TRUE)

The output is -

Error in xheader_er_or_status(resp) : Not Found (HTTP 404).

What am I doing wrong here? And what is the solution?

0

There are 0 answers