Skip to content

Commit 9c79a55

Browse files
authored
Merge pull request #6 from mikeym88/switch-to-new-api-version
Switch to new api version
2 parents b05d513 + a1b936b commit 9c79a55

File tree

2 files changed

+243
-158
lines changed

2 files changed

+243
-158
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
This project is a wrapper for the PatentsView API.
44

5-
* [PatentsView Glossary](http://www.patentsview.org/api/glossary.html) provides a description of the variables.
5+
* [PatentsView Glossary](https://patentsview.org/glossary) provides a description of the variables.
66

77
## Similar Projects
88

99
* The Patents Client project is a Python client for patents: [PyPI](https://pypi.org/project/patent-client/) | [GitHub](https://github.com/parkerhancock/patent_client) | [Docs](https://patent-client.readthedocs.io/en/latest/).
1010

1111
## Important Notes:
1212

13-
* Use <https://dev.patentsview.org> and not <https://www.patentsview.org/>; the former is laxer in terms of accepting input
14-
* Naming is finicky (more so on the second one), even spacing and other character affect the search results (see below).
13+
* An API key is required, one can be requested [here](https://patentsview.org/apis/keyrequest).
14+
* There needs to be an environmental variable PATENTSVIEW_API_KEY set to the value of your API key.
15+
* The endpoints of the new version of the API are at <https://search.patentsview.org>, they had last been at <https://api.patentsview.org/>.
16+
* The API team produced a [Swagger UI page](https://search.patentsview.org/swagger-ui/) for the new version of the API. Your API key can be entered by pressing the Authorize button.
17+
* The new version of the API now returns USPC classifications, but we'll use CPC classifications. After May 2015 the patent office stopped assigning USPCs to utility patents.
1518

1619
## Remarks about the data
1720

@@ -21,15 +24,10 @@ This project is a wrapper for the PatentsView API.
2124
* As an example: `NETFLIX, INC.` has an `assignee_key_id` of `17594` and an `assignee_id` of `org_2lAuxOpAtNMvtTxhuLmX`; `NETFLIX.COM, INC.` on the other hand an `assignee_key_id` of `org_UNHkzir8tY7NlQrOJKT4` and an `assignee_id` of `363028`. (This of course assumes `NETFLIX, INC.` and `NETFLIX.COM, INC.` are the same company, which is highly probable).
2225
* The same applies for acquisitions. Example: Company A has patent *X*; once company B acquires company A, patent *X* would still show that it is assigned to company *A*.
2326
* Probably the same thing holds if a company acquires certain patents of another company.
24-
* The patents can be assigned to organizations (as opposed to individuals). This is indicated by the 'assignee organization' field returned by the API.
27+
* The patents can be assigned to organizations (as opposed to individuals). This is indicated by the 'assignees.assignee_organization' field returned by the API.
2528
* The assignee organizations (i.e. companies) are distinguished by name. Each organization name is a 'separate' company.
2629
* This means that a patent can be assigned to "IBM", "IBM Inc.", "International Business Machines".
2730
* Different organization names have different `assignee_id`s and `assignee_key_id`s (see `NETFLIX` example above).
28-
* **Different endpoints behave differently**: particularly <https://www.patentsview.org/> and <https://dev.patentsview.org>
29-
* **Naming is finicky on the first one**: If you search for `Abbott Laboratories` or for `ABBOTT LABORATORIES`,
30-
you will get the same results. If you search for `ABBOTT Laboratories`, `Abbott LABORATORIES`,
31-
or `abbott laboratories`, you will get nothing.
32-
* The second one seems to work better, but you still have to replace the carriage return and line break characters.
3331

3432
## Adding companies
3533

@@ -100,7 +98,7 @@ SELECT
10098
an.name as "Company Name Listed on Patent",
10199
p.year,
102100
p.grant_date as "Grant Date",
103-
p.uspc_class as "USPC Classes"
101+
p.cpc_group_id as "CPC Subsections"
104102
FROM
105103
patents as p
106104
JOIN

0 commit comments

Comments
 (0)