PatentsView / PatentsView-API

BSD 2-Clause "Simplified" License
12 stars 4 forks source link

Internal server errors #51

Open WWakker opened 3 years ago

WWakker commented 3 years ago

I'm getting a lot of internal server errors using the POST method. An example of a query I'm trying to make is this:

url = https://api.patentsview.org/patents/query

body = {"q": {"_and": [{"_gte": {"patent_date": "1990-02-01"}}, {"_lt": {"patent_date": "1990-03-01"}}]}, "f": ["patent_number", "patent_year", "patent_date", "app_date", "app_number", "patent_processing_time", "patent_average_processing_time", "patent_kind", "patent_type", "patent_title", "assignee_sequence", "assignee_id", "assignee_type", "assignee_organization", "assignee_first_name", "assignee_last_name", "assignee_country", "assignee_state", "assignee_city", "assignee_latitude", "assignee_longitude", "assignee_first_seen_date", "assignee_last_seen_date", "inventor_sequence", "inventor_id", "inventor_first_name", "inventor_last_name", "inventor_country", "inventor_state", "inventor_city", "inventor_latitude", "inventor_longitude", "inventor_first_seen_date", "inventor_last_seen_date", "nber_category_id", "nber_subcategory_id", "cpc_sequence", "cpc_category", "cpc_section_id", "cpc_subsection_id", "cpc_group_id", "cpc_subgroup_id"], "o": {"page": 1, "per_page": 10000}}

I also get it when I lower the number of fields. Lowering the per_page parameter helps a bit but I'm even getting errors with per_page=100 now.

crew102 commented 3 years ago

This may be related to that, but I'm getting internal server errors when I set per_page to 10,000 for the query shown below. I don't get the error when using a lower per_page value.

https://api.patentsview.org/patents/query?q=%7B%22_and%22:[%7B%22_gte%22:%7B%22patent_date%22:%222007-07-25%22%7D%7D,%7B%22_contains%22:%7B%22assignee_organization%22:%22microsoft%22%7D%7D]%7D&f=[%22inventor_city%22,%22inventor_country%22,%22inventor_county%22,%22inventor_county_fips%22,%22inventor_first_name%22,%22inventor_first_seen_date%22,%22inventor_id%22,%22inventor_last_name%22,%22inventor_last_seen_date%22,%22inventor_lastknown_city%22,%22inventor_lastknown_country%22,%22inventor_lastknown_latitude%22,%22inventor_lastknown_location_id%22,%22inventor_lastknown_longitude%22,%22inventor_lastknown_state%22,%22inventor_latitude%22,%22inventor_location_id%22,%22inventor_longitude%22,%22inventor_sequence%22,%22inventor_state%22,%22inventor_state_fips%22,%22inventor_total_num_patents%22,%22patent_number%22]&o=%7B%22include_subentity_total_counts%22:false,%22matched_subentities_only%22:true,%22page%22:1,%22per_page%22:10000%7D&s=

killahjones commented 3 years ago

We are looking into this issue and will get back to you as soon as possible. Thanks!

bradchattergoon commented 3 years ago

Hello. Have there been any updates on this issue? I have been running into the same "Internal Server Error" problem that is stochastic even for the exact same query. Please let me know.

emelluso commented 3 years ago

Hello all, checking in for an update! The PatentsView team increased the API server size with the last data update.

Going to close this issue for now, and hoping the server increase resolves these errors... if errors continue, please let the PatentsView group know!