uspto_search_patentsview.Rd
Submits a query to one of the PatentsView endpoints.
uspto_search_patentsview(query, fields = NULL, sort = NULL,
outDir = tempdir(), include_related = FALSE, start = 1,
limit = 10000, endpoint = "patent", post = TRUE, retry = 10,
verbose = FALSE, legacy = TRUE, key = Sys.getenv("PATENTSVIEW_KEY"),
cores = detectCores() - 1, overwrite = FALSE)
A query string or list; for example list(patent_number = 7861317)
or
'{"_text_all": {"patent_abstract": ["photographic", "noodle"]}}'
. See
API Query Language.
A vector of fields to return; defaults to all for the given endpoint. Set to NULL
to use the API's default.
A list or list of lists specifying how to sort results (e.g., list(patent_date = "asc")
).
Directory in which to save results; defaults to a temporary directory.
Logical; if TRUE
, includes subentities related to entities matching the search criteria.
Page to start collecting results on.
Maximum number of results to return; sets page size, up to 10,000 per page
(1,000 if legacy
if FALSE
).
Name of the API endpoint to search in, as listed on PatentsView.
Logical; if FALSE
, will make a GET rather than POST request.
Maximum number of times to retry a request, in the event of a rate limit.
Logical; if FALSE
, does not print status messages.
Logical; if FALSE
, will use the beta API, which requires a key.
Beta API key (Request a key);
defaults to the PATENTSVIEW_KEY
environment variable.
Number of CPU cores to use when retrieving multiple pages of results.
Logical; if TRUE
, overwrites an existing result.
A data.frame
of results, if any were found. This may contain list entries
of data.frame
with varying dimensions, depending on the endpoint
and fields
.
if (FALSE) {
# search for patents with a meteorology classification:
# https://www.uspto.gov/web/patents/classification/cpc/html/cpc-G01W.html
results <- uspto_search_patentsview(list(cpc_group_id = "G01W"))
# search by date and keyword:
results <- uspto_search_patentsview(list(
"_and" = list(
list(patent_date = "2002-01-08"),
list("_text_any" = list(patent_abstract = "motorcycle"))
)
))
}