Description Usage Arguments Value Examples
This function makes an HTTP request to the PatentsView API for data matching the user's query.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
query |
The query that the API will use to filter records.
|
fields |
A character vector of the fields that you want returned to you.
A value of |
endpoint |
The web service resource you wish to search. |
subent_cnts |
Do you want the total counts of unique subentities to be
returned? This is equivalent to the |
mtchd_subent_only |
Do you want only the subentities that match your
query to be returned? A value of |
page |
The page number of the results that should be returned. |
per_page |
The number of records that should be returned per page. This
value can be as high as 10,000 (e.g., |
all_pages |
Do you want to download all possible pages of output? If
|
sort |
A named character vector where the name indicates the field to
sort by and the value indicates the direction of sorting (direction should
be either "asc" or "desc"). For example, |
method |
The HTTP method that you want to use to send the request. Possible values include "GET" or "POST". Use the POST method when your query is very long (say, over 2,000 characters in length). |
error_browser |
Deprecated |
... |
Arguments passed along to httr's |
A list with the following three elements:
A list with one element - a named data frame containing the data returned by the server. Each row in the data frame corresponds to a single value for the primary entity. For example, if you search the assignees endpoint, then the data frame will be on the assignee-level, where each row corresponds to a single assignee. Fields that are not on the assignee-level would be returned in list columns.
Entity counts across all pages of output (not just
the page returned to you). If you set subent_cnts = TRUE
, you will
be returned both the counts of the primary entities and the subentities.
Details of the HTTP request that was sent to the server.
When you set all_pages = TRUE
, you will only get a sample request.
In other words, you will not be given multiple requests for the multiple
calls that were made to the server (one for each page of results).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run:
search_pv(query = '{"_gt":{"patent_year":2010}}')
search_pv(
query = qry_funs$gt(patent_year = 2010),
fields = get_fields("patents", c("patents", "assignees"))
)
search_pv(
query = qry_funs$gt(patent_year = 2010),
method = "POST",
fields = "patent_number",
sort = c("patent_number" = "asc")
)
search_pv(
query = qry_funs$eq(inventor_last_name = "crew"),
all_pages = TRUE
)
search_pv(
query = qry_funs$contains(inventor_last_name = "smith"),
endpoint = "assignees"
)
search_pv(
query = qry_funs$contains(inventor_last_name = "smith"),
config = httr::timeout(40)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.