Upstream quirks
Behavior of the live Figshare API v2, with the docs.figshare.com documentation as the reference. Where a quirk affects bibliofabric.figshare, the behavior of the client is noted.
There are no /groups or /datasets routes
The documentation and several third-party indexes name GET /groups and
GET /datasets. Both answer 404 on the live API. Groups surface only as
the integer group filter of the list and search routes; datasets are the
articles with item_type=3 (ITEM_TYPE_IDS["dataset"]). The OpenAPI
specification at docs.figshare.com/swagger.json lists neither route.
No totals anywhere
Every list and search route answers a bare JSON array. There is no count
endpoint, so Page.total is always None and count() raises. Deep
iteration stops at the offset wall (see below); walk pages and count what
you received.
The offset wall sits at 5000
The prose documentation says the offset caps at 1000; the live API accepts
1001 and rejects 5001 with HTTP 400 BadRequest ("offset: 5001 is greater
than the maximum of 5000"). The same wall applies to the page number:
the start offset (page - 1) * page_size must stay at or under 5000, so
page_size=1000 with page=6 still answers. The client checks it before
any request through the dialect's max_offset.
X-Cursor continues past the wall, as a header only
Responses to the list and search routes carry an x-cursor header with an
opaque token. Sending it back bypasses the documented 9,000-item retrieval
limit. It only works as a request header: the same value as a query
parameter or body key answers 400 "Cursor query context does not match".
The core cursor support sends cursors as query parameters, so this client
does not drive the cursor; callers who need it can read the header from a
raw client.request() call.
Blank fields arrive as null
The API includes every field of a representation and fills missing values
with null instead of omitting them. Models type everything optional and
keep undocumented fields through extra="allow".
Loose values in typed fields
The mimetype of a file can be the literal string "undefined" when no
type was supplied at upload. folder_structure is a path string on most
items and an empty dict on items without folders. Funding entries are
objects on most records and plain strings like
"National Science Foundation, Grant #1943550" on others; the models
accept both shapes.
Downloads redirect twice
The download routes (/articles/{id}/download,
/articles/{id}/versions/{v}/download, /file/download/{id}) answer HTTP
302 with a JSON body naming the ndownloader.figshare.com URL, which
redirects again to the storage host. The core download follows the chain
hop by hop and drops the Authorization header at cross-origin hops, so
a token never leaks to the storage host.
Version listings carry version numbers, not ids
/articles/{id}/versions and /collections/{id}/versions answer entries
like {"version": 1, "url": ...}. The version number, not a separate id,
addresses /versions/{v}. Collection version entries add a funding
list.
Search pages independently of the list routes
The search bodies accept page up to 5000 and page_size up to 1000 per
the specification, while the offset of the plain list routes caps at 5000.
Both walls are enforced client-side. search_for needs at least 3
characters; shorter values answer 422, and the client lets the request go
through so upstream behavior stays visible.
Unknown query parameters are ignored
The list routes ignore unknown query parameters instead of rejecting them, so a misspelled filter silently returns unfiltered results. Prefer the filter models, whose keys mirror the search bodies.