Upstream quirks
Behavior of the Open Policy Finder API that shapes how the client works, with the developer documentation and its metadata schema as the reference. No live API check ran while building the client: the pages below describe the published contract, and a key holder may find drift where the docs and the service disagree.
Every route needs a key
The gateway rejects unauthenticated requests with HTTP 403 and the body
{"message": "Missing Authentication Token"} on every path, including
paths that do not exist. Without a valid key the client raises
AuthError on the first call, and the gateway body cannot distinguish a
bad key from a wrong path.
Position paging stops at 10000 records
/retrieve pages with limit (1 to 100, default 100) and offset, and
the documentation bounds the window as offset * limit < 10000; deeper
pages continue through the search_after token of the response body. The
client raises ConfigurationError before sending when a requested page
would cross the window, and iterate() walks search_after instead. The
same window applies to /object_ids, whose limit reaches 5000.
next_search_after is the literal string to send back as search_after;
the docs show it as "[]" when the result set is exhausted, and the
client treats "[]", empty, and missing as the end.
One list route serves six item types
/retrieve and /retrieve_by_id carry an item-type parameter with the
values funder, funder_group, repository, publisher,
publisher_policy, and publication. The publication records are the
journal records: /retrieve_by_id accepts a journal's numeric id or one
of its ISSNs as identifier. format=Json still appears in older
examples, but the current docs say JSON is always returned and the
parameter is no longer supported; the client never sends it.
Filters travel as one JSON parameter
Up to three [field, operator, value] arrays go into the filter
parameter, combined with AND. The operators are equals, contains word
(a word match, not a substring match), and the numeric and date range
operators gte and lte. Date values accept a year, a year and month, a
day, or an ISO 8601 timestamp, and timestamps need the literal Z
because time zones are not supported. Values travel as JSON strings, as
in [["country","equals","ca"]].
Each item type has its own filter fields, and the docs list several
synonyms (name for name_name, funderid for id, and so on). The
client sends the short names. funder_group has no documented filter
fields, so client.funder_groups.search() takes only paging arguments.
The nested policy shapes vary by parent
The permitted_oa field holds a yes/no string inside publisher
records and full rule objects inside publisher policy and publication
records; the policy summaries in publisher and publication records
therefore use different models. licence also appears with both the
license and licence spellings in phrase fields, and the repository
policies section is documented as under review and may change, so the
client keeps it as raw objects.
Discrete values arrive with phrase tables (*_phrases) next to them; the
models keep the value fields and let the phrase tables through as extra
fields.
OpenDOAR data flows through the same API
The OpenDOAR directory is the repository item type of this API. The
OpenDOAR service has paused new submissions and updates while it is under
review, with an update promised for January 2027, so repository records
can age; the API keeps answering. The open_access_data_archiving_policy
section documents a does_no_mention requirement value, spelled without
the second n of "no mention"; the models use the documented spelling.