GithubHelp home page GithubHelp logo

mikeym88 / patentsview-api-wrapper Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 99 KB

A Python 3 wrapper for the Patentsview.org API. This script will retrieve the patents for the companies specified (in the form on an excel spreadsheet).

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
patentsview patentsview-api patents-database patents uspto python python3 python-3 patent-search patent-data

patentsview-api-wrapper's Introduction

PatentsView API wrapper

This project is a wrapper for the PatentsView API.

Similar Projects

  • The Patents Client project is a Python client for patents: PyPI | GitHub | Docs.

Important Notes:

  • An API key is required, one can be requested here.
  • There needs to be an environmental variable PATENTSVIEW_API_KEY set to the value of your API key.
  • The endpoints of the new version of the API are at https://search.patentsview.org, they had last been at https://api.patentsview.org/.
  • The API team produced a Swagger UI page for the new version of the API. Your API key can be entered by pressing the Authorize button.
  • 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.

Remarks about the data

  • Patent Numbers are alphanumeric (they can include letters)
  • PatentsView only includes information about the patent at issue. It does not include changes to patent information after the patent has been issued.
    • This means that if the company changes name, it won't be reflected in the patent. Example: if "International Business Machines" renames itself to "IBM", patents issued to "International Business Machines" will still be issued to "International Business Machines" (and not "IBM").
    • 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).
    • 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.
    • Probably the same thing holds if a company acquires certain patents of another company.
  • The patents can be assigned to organizations (as opposed to individuals). This is indicated by the 'assignees.assignee_organization' field returned by the API.
  • The assignee organizations (i.e. companies) are distinguished by name. Each organization name is a 'separate' company.
    • This means that a patent can be assigned to "IBM", "IBM Inc.", "International Business Machines".
    • Different organization names have different assignee_ids and assignee_key_ids (see NETFLIX example above).

Adding companies

Create an Microsoft Excel spreadsheet (.xlsx file) with the following structure:

Firm ID Firm Name Alternative names
ID Name 1 Name 2 Name 3 Name 4 ... Name X
ID2 Company 2 Primary Name / Name 1 Name 2 Name 3 Name 4 ... Name X
ID1 Company 1 Primary Name / Name 1 Name 2 Name 3 Name 4 ... Name X

Database Structure

Here is an Entity Relationship Diagram (ERD) of the database structure.

Entity Relationship Diagram (ERD) of the database structure

Using SQL to Select Patents

The sql folder has some SQL scripts that might come in handy. As an example, here is SQL query that selects patents between two dates:

SELECT
	p.patent_number as "Patent Number",
	p.patent_title as "Patent Title",
	-- p.company_id as "Company ID",
	c.name as "Company Name",
	-- p.company_alternate_name_id as "Alternate Name ID",
	an.name as "Company Name Listed on Patent",
	p.year,
	p.grant_date as "Grant Date",
	p.cpc_group_id as "CPC Subsections"
FROM 
	patents as p
JOIN 
	companies as c
ON
	p.company_id = c.id
LEFT JOIN 
	alternate_company_names as an
ON
	p.company_alternate_name_id = an.id
WHERE
	p.grant_date > DATE("2006-01-03") AND
	p.grant_date < DATE("2010-06-13");

Software Applications

patentsview-api-wrapper's People

Contributors

mikeym88 avatar mustberuss avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

patentsview-api-wrapper's Issues

Future Development? - Patent Client

Hey! This is the only way I can see to contact you, so here I go!

I'm the author and maintainer of patent_client, a library with a similar scope and feature set as your own. patent_client is under active development, and growing, so if you'd like, I'd love to have you contribute, or add a note on your readme pointing to it!

Patent Client Logo

PyPI | GitHub | Docs

Thanks!

Parker

The API team pushed breaking changes

The API team made changes to the new version of the API that broke the wrapper. They changed the url of the patent_citation endpoint, changed the way that paging works and some of attribute names changed. I got it to work in my fork and could submit a PR if you'd like. It's about a dozen commits, with most of the changes in main.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.