Skip to content

INSPIRE-HEP upstream quirks

Behavior of the live INSPIRE-HEP API that the client accounts for or that callers should know.

Search and paging

  • INSPIRE allows 15 requests per 5 seconds per IP, and a request blocked by the limiter also counts against the window. After a 429, wait at least 5 seconds; the client's default pace of 2 requests per second stays inside the limit, and the core retry waits for the response's Retry-After header when the API sends one.
  • size caps at 1000; a larger value answers HTTP 400 Maximum search page size of '1000' results exceeded. The client clamps page_size to 1000 before sending.
  • A search cannot reach past record 10000: a window that passes that point answers HTTP 400 SearchPaginationRESTError: Maximum number of 10000 results have been reached. The client raises ConfigurationError before sending when the offset would exceed 9999. Split a broad query into narrower ones to reach further.
  • links.next in a search answer is the URL of the next page; the client instead pages with page and size, which the API supports directly.
  • An invalid sort value is ignored, and the results come back unsorted. Documented orders: mostrecent and mostcited for literature, mostrecent and deadline for jobs, dateasc and datedesc for conferences and seminars.
  • The SPIRES-style query a E.Witten.1 answered 0 results when probed, although the official documentation uses it as an example. Field-path queries (abstracts.source:Springer, recid:4328, control_number:1011247) work.
  • An invalid q expression answers HTTP 200 with an empty result, not an error.
  • Facet filters beyond q are not enumerated in the API documentation; the seminars collection accepts start_date=upcoming. Pass others as a plain filters mapping; the API ignores unknown parameters.
  • fields= (the client's select=) trims metadata to the named fields and only works on searches, not on single-record routes.

Records

  • Search hits carry created, updated, id (the recid as a string), links, and metadata; single records add uuid and revision_id.
  • metadata holds more fields than the schemas document, and INSPIRE states that undocumented fields can change at any time. The client models type the documented fields and keep the rest accessible through extra="allow".
  • Dates inside metadata are partial as often as not (1984-10 for a month, 1993 for a year), so the models type them as strings. Only the envelope created and updated timestamps are typed as datetimes.
  • The same field sometimes changes type between records: a series number arrives as an integer on one record and as a string on another.
  • /literature/{id}/citations wraps its records in metadata instead of the hits envelope, reports no total in the usual place, and carries the citing total as metadata.citation_count.

Content

  • Most metadata is published under a CC0 license, but restrictions apply to some fields, and bulk collection of email addresses is not allowed. The API hides author email addresses unless the caller authenticates; this client offers no helper for harvesting them.
  • Alternative citation formats (bibtex, latex-eu, latex-us, cv, json-expanded) are only rendered for literature records. The cv format answers HTML, and json-expanded inlines linked ROR and ORCID identifiers.
  • The bibliography generator (POST /api/bibliography-generator) is a write-shaped POST route and is not wrapped.