This relates to the Patentsview.org API.
http://www.patentsview.org/api/uspc.html#field_list
I would like to modify my current query to limit itself to one or more USPC IDs (US patent classification) I am using id=348 for my test case.
Here is a query I have that works:
PATENTS_API_URL_TEMPLATE = 'http://www.patentsview.org/api/patents/query?q={%22_text_any%22:{%22patent_abstract%22:%22term_placeholder%22}}&f=[%22patent_number%22,%22patent_date%22,%22inventor_last_name%22,%22patent_abstract%22]'
The above query searches for the term_placeholder anywhere in the text and returns the patent number, data, inventors last name, and abstract.
I don't care about the date and name. I only care about the patent number and abstract. But I also want to limit it to one or more patent classes.
I tried the following:
PATENTS_API_URL_TEMPLATE = 'http://www.patentsview.org/api/uspc_mainclasses/query?q={%22_and%22:[{%22_text_any%22:{%22patent_abstract%22:%22term_placeholder%22}},{%22uspc_mainclass_id%22:%22348%22}}]}&f=[%22patent_number%22,%22patent_abstract%22]'
The error I get is ValueError: No JSON object could be decoded.
I was using the following example provided by Patentsview:
http://www.patentsview.org/api/uspc_mainclasses/query?q={"_and":[{"_contains":{"assignee_organization":"Census"}},{"_gte":{"patent_date":"2000-01-01"}},{"_lte":{"patent_date":"2010-12-31"}},{"_contains":{"uspc_mainclass_title":"Electricity"}}]}&f=["inventor_id","inventor_first_name","inventor_last_name"]
I replaced the double quotes with %22, switched from api/patents to api/uspc_mainclasses, removed the name and date fields, and otherwise tried to follow the example.
What am I doing wrong? Thanks!