Skip to main content
 
 
 
IN THIS SECTION
3 posts
Krishan Shah
Last seen: 03/17/2021 - 16:08
Joined: 03/10/2021 - 11:44
Patents View API Code

Hi,

I have been using the Patents View API for a few months to run a simple code:

code = ["B60W", "A44C"] 
year = ["2020"] 
url = "https://api.patentsview.org/patents/query" 
data = { 
    "q":{ "_and":[{"patent_year":year},{"cpc_group_id":code}]}, 
    "f":["patent_number","patent_title","patent_abstract","patent_year","cpc_group_id"],
    "s":[{"patent_title":"asc"}],
    "o":{"page":1,"per_page":10000}
    

resp= requests.post(url, json=data) 
text = resp.json()

 

Today I received this JSONDecodeError:

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Looking at the URL in my browser it appears the API url is down (502 Bad Gateway), is this the issue or has there been an update to the query tool?

 

PVTeam
Role: moderator
Last seen: 03/15/2024 - 15:25
Joined: 10/17/2017 - 10:47
API ISSUE

Hello Krishan, this error seems to now be resolved. We are still investigating what brought the API down earlier today. 

Thank you for letting the team know!

-Emily, PV Team

dbarros
Last seen: 01/18/2022 - 16:05
Joined: 10/01/2021 - 14:54
API Code

 

Hi,

    I've been using the Patents View API for some time now.
    I'm enjoying it a lot, the tool is very useful. Congratulations!

    Today I tried to use and all commands are returned "502 Bad Gateway".

    Example: https://api.patentsview.org/patents/query?q={"inventor_id":"7677158-2"}&f=["patent_number","patent_title"]

Thank you so much!
      Daniel