ropensci / patentsview

An R client to the PatentsView API
https://docs.ropensci.org/patentsview
Other
31 stars 9 forks source link

Simple Query does not work anymore #32

Open NicolasWittstock opened 8 months ago

NicolasWittstock commented 8 months ago

Hello Team,

The following style of query used to work perfectly fine for me, but stopped working recently. What is wrong?

query <- with_qfuns( and( gte(patent_date = "2020-01-01"), lte(patent_date = "2022-12-31"), begins(cpc_subgroup_id = "H02S") ))

fields <- c("patent_number", "patent_date" ,"assignee_organization")

pv_out <- search_pv( query = query, endpoint = "patents", fields = fields, all_pages = TRUE)

df <- unnest_pv_data(pv_out$data, "patent_number")

Thanks so much!

mustberuss commented 8 months ago

@NicolasWittstock, is your script throwing errors or just not returning data? The patentsview team recently reloaded the cpc table after a bad data load. See https://patentsview.org/forum/7/topic/756#comment-703 Another user reported a decrease in cpc data available through the API https://patentsview.org/forum/7/topic/748

NicolasWittstock commented 8 months ago

It was throwing errors, but this morning it is saying that patentsview no longer works without an API. I do have an API though, but do not know how to integrate it into the syntax.

mustberuss commented 8 months ago

Can you try using the CRAN version of the r package? The code above throws warnings but seems to work using it. My PR for the new version of the API isn't complete, The new version of the API is not complete and the original version of the API is still around. I'm not sure what you'd get with a dev build.

I do have unofficial stuff here https://mustberuss.github.io/patentsview/ but with the new version of the API just about everything is different. . What's on r-universe should work with the new version of the API with rewritten scripts.