output |
---|
github_document |
An R client to the PatentsView API, recently renamed the PatentSearch API
You can get the stable version for the original version of the API from CRAN:
install.packages("patentsview")
Or the development version from GitHub (Currently broken):
if (!"devtools" %in% rownames(installed.packages())) {
install.packages("devtools")
}
devtools::install_github("ropensci/patentsview")
Or the R package for the new version of the API from r-universe:
install.packages("patentsview", repos = c("https://mustberuss.r-universe.dev"))
Or the R package for the new version of the API from GitHub:
if (!"devtools" %in% rownames(installed.packages())) {
install.packages("devtools")
}
devtools::install_github("mustberuss/patentsview@api-redesign")
The new version of the API requires an API key, or all of your requests will be blocked. An API key can be obtained here. The updated R package will look for an environmental variable PATENTSVIEW_API_KEY set to the value of your key. For windows it would be
set PATENTSVIEW_API_KEY=my_keys_value_without quotes
See this page about the change. The navigation there will get you to the updated vignettes and reference pages.
The PatentsView API provides an interface to a disambiguated version of USPTO. The patentsview
R package provides one main function, search_pv()
, to make it easy to interact with the API:
library(patentsview)
search_pv(query = '{"_gte":{"patent_date":"2007-01-01"}}')
#> Error: The new version of the API requires an API key
Head over to the package's webpage for more info, including:
- A getting started vignette for first-time users.
- An in-depth tutorial on writing queries
- A list of basic examples
- Two examples of data applications (e.g., a brief analysis of the top assignees in the field of databases)
This package was first introduced in 2017 in an rOpenSci blog post which used the original version of the API. The same content, reworked to use the new version of the API, is available here. A draft of a possible Tech Note about the new version of the API and R package is here.