ropensci / openalexR

Getting bibliographic records from OpenAlex
https://docs.ropensci.org/openalexR/
Other
103 stars 21 forks source link

Search filters do not support the | operator #94

Closed trangdata closed 1 year ago

trangdata commented 1 year ago

It seems that OpenAlex recently changed their API, and an example in our readme no longer works, which is a bummer — I was really enjoying using OR in search. There must be a reason behind this rationale. To be investigated.

CC @ozgur-ozer

library(openalexR)

works_search <- oa_fetch(
  entity = "works",
  title.search = c("bibliometric analysis", "science mapping"),
  cited_by_count = ">50",
  from_publication_date = "2020-01-01",
  to_publication_date = "2021-12-31",
  sort = "cited_by_count:desc",
  verbose = TRUE
)
#> Requesting url: https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2020-01-01%2Cto_publication_date%3A2021-12-31&sort=cited_by_count%3Adesc
#> Error: OpenAlex API request failed [403]
#> Invalid query parameters error.
#> <Search filters do not support the | operator. Problem value: bibliometric analysis|science mapping>

Created on 2023-04-06 with reprex v2.0.2

trangdata commented 1 year ago

Watching release notes 👀

trangdata commented 1 year ago

@ozgur-ozer Casey has turned this functionality back on. You should no longer receive this error.

ozgur-ozer commented 1 year ago

Thanks, @trangdata.