GithubHelp home page GithubHelp logo

swinc / fetch-ppubs-patents Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 594 KB

A TypeScript/JavaScript library for pulling patents from the USPTO Patent Public Search API

License: MIT License

TypeScript 99.67% JavaScript 0.33%
patent patent-data patent-search

fetch-ppubs-patents's Introduction

fetch-ppubs-patents

NOTE: The USPTO has updated their API and this library is no longer functional. It may be a easy fix but I leave that to future authors.

fetch-ppubs-patents is a TypeScript/JavaScript library for pulling patents from the USPTO Patent Public Search API.

It has only one dependency: axios.

Usage

Consistent with the Patent Public Search API, there are only three top-level methods:

  • fp.searchPatents(query)
    • returns an object with search details, including an array with basic patent details (guid, title, classifications, etc. but no main text)
    • see type for fields on returned object
  • fp.getPatentByGuid(guid)
    • returns an object with full patent details
  • fp.getPatent(patentNumber)
    • a convienence function that returns an object with full patent details for the first search hit on the passed patentNumber parameter

For example:

import * as fp from 'fetch-ppubs-patents'

const results = fp.searchPatents("nvidia.as.")

const firstResult = results.patents[0].publicationReferenceDocumentNumber // "11508113"

const patent = fp.getPatent(firstResult)

console.log(patent)

{
  guid: 'US-11508113-B2',
  publicationReferenceDocumentNumber: '11508113',
  compositeId: '1000006700342!US-US-11508113',
  publicationReferenceDocumentNumber1: '11508113',
  datePublishedKwicHits: null,
  datePublished: '2022-11-22T00:00:00Z',
  inventionTitle: 'Denoising techniques suitable for recurrent blurs',
  type: 'USPAT',
  mainClassificationCode: '1/1',
  applicantName: [ 'NVIDIA Corporation' ],
  assigneeName: [ 'NVIDIA Corporation' ],
  /* LOTS OF OTHER STUFF */
}

Properties of API Responses

Properties of the API responses are defined in the src/types directory.

The search API response is defined in PPubsSearchAPIResponse.ts.

The patent API response is defined in PPubsHighlightAPIResponse.ts.

USPTO Terms of Use

This library uses an undocumented API present in the USPTO Public Patent Search system.

Per the USPTO Terms of Use, this API is "not designed or intended to be a source for bulk downloads of USPTO data when accessed through the website’s interfaces."

Please respect USPTO systems and do not use this API for bulk downloads. Alternative Electronic Bulk Data Products are available.

Development

Building from TypeScript

npm run build will build the TypeScript files in src and tests directories to the dist directory.

Testing

npm test will run the TypeScript tests in the tests directory. Use during development.

npm run test:js will run the JavaScript tests in the dist/tests directory. Use to verify correct build for deployment.

fetch-ppubs-patents's People

Contributors

swinc avatar

Stargazers

 avatar

Watchers

 avatar

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.