-
Why this returns a non-German institution, and how can I get a random German institution?
|
Beta Was this translation helpful? Give feedback.
Answered by
J535D165
May 26, 2025
Replies: 1 comment 5 replies
-
The following API call returns 1 random DE institution https://api.openalex.org/institutions?page=1&filter=country_code:countries/de&sample=1 How can I replicate it in PyAlex? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I know, OpenAlex does not support using "random" in combination with filters (and doesn't raise an error on their side). For your example, use
sample()
https://github.com/J535D165/pyalex?tab=readme-ov-file#sample.