Skip to main content
 
 
 
IN THIS SECTION
3 posts
cljack
Last seen: 12/22/2022 - 21:51
Joined: 12/22/2022 - 18:54
Having problems passing field list to the new API

Hi All,

I'm in the process of upgrading to the new API and am problems requesting fields.

One query that I've tried is one that can be found in the API documentation. It is:

https://search.patentsview.org/api/v1/patent/?q={"patent_year":"2020"}&f=["patent_number","patent_title"]

This returns error=true.

if I remove the field list specification by removing &f=["patent_number","patent_title"] it returns results.

It seems that the only fields that can be specified are the defaults (["patent_id","patent_title","patent_date"]).

I need to have patent_number and patent_abstract returned and have tried with &f=["patent_id","patent_title","patent_date", "patent_number","patent_abstract"]. No luck - returns an error.

How do I go about getting these fields with the new API? Are  patent_number and patent_abstract not yet available or am I doing something wrong?

Russ
Last seen: 12/06/2024 - 09:12
Joined: 11/14/2017 - 22:15
The api changed recently

It looks like a recent API update renamed "patent_number" to "patent_id".   Change that in your f: parameter and you should be good.

If you try your request in the Swagger UI page  you'll see the ultra helpful x status reason x-status-reason: Invalid field: patent_number   You wouldn't know to use patent_id instead but it is shown in the sample responses.   

I'm working on an update to the r package and the API change broke some of my test cases!

Russ Allen

 

PVTeam
Role: moderator
Last seen: 11/29/2024 - 15:02
Joined: 10/17/2017 - 10:47
Hello all,  Just confirming…

Hello all, 

Just confirming that we did change the patent_number field to patent_id during the October 2022 standardization. We made these changes on the Swagger UI documentation in November, but do have some trailing documentation modification to reflect this change in the web pages. 

Thank you for raising this!

PVTeam