Authentication
The Scholarly API is authenticated using an API Key attached to a User record within Scholarly. Using this API Key confers all permissions associated with that user. Most of the time, these API Keys will be attached to service accounts with the “institution admin” permission. If you have questions or concerns, please reach out to your Scholarly rep. This API Key will always begin withsch_
.
Include this API Key in the Authorization
header with the Bearer
prefix. Here’s an example in curl:
Rate Limiting
The Scholarly API defaults to 1 request per second per institution, unless otherwise negotiated within your contract. When the rate limit is exceeded, Scholarly will respond with429 Too Many Requests
. We encourage you
to handle these rate limits gracefully.
Versioning
The Scholarly API practices Semantic Versioning 2.0.0 by encoding the major version in the path component, i.e./v1
. This
means that any breaking changes will necessitate a bump in the version number. As a client, you can expect
to never see breaking changes within the same version of the API.
Scholarly classifies changes or removal of existing attribute or relationship behavior as breaking changes. Adding attributes or
relationships to existing objects is not considered a breaking change. You may see payloads grow over time.
IDs
All resources within the Scholarly API will be identified by a UUID represented as a string.Read-on-write Consistency
To ensure a performant experience for all customers and users, Scholarly employs the use of database replicas for serving read traffic in many situations. AllGET
requests in the Scholarly API will be served from a read replica.
As a result, GET
requests may experience replica lag leading to slightly stale data.
Requests that write, i.e PATCH
, POST
, and DELETE
, ensure read-on-write consistency. All endpoints will return the most up-to-date copy of
the data.
Let’s take a look at a few examples:
Pagination
The Scholarly API uses pagination to efficiently handle large datasets. All collection endpoints support pagination following the JSON:API pagination specification. To ensure consistent performance regardless of how deep in a list the query might be reaching, the Scholarly API implements cursor-based pagination. Rather than using a “limit + offset”, you will set the page size and then be returned a cursor in thelinks.next
attribute of the response.
Request Parameters
Pagination is controlled using the following query parameters:page[size]
- The number of items per page (default: 25, minimum: 1, maximum: 100)
Example Requests
Page Size Limits
To ensure optimal performance:- Default page size: 25 items
- Minimum page size: 1 item
- Maximum page size: 100 items
Response Metadata
Paginated responses include metadata about the collection in themeta
field:
Best Practices
- Start with reasonable page sizes: Use the default of 25 items unless you have specific requirements
- Handle empty results: When iterating through pages, stop when you receive an empty
data
array - Respect rate limits: Pagination doesn’t exempt you from rate limiting - space out your requests appropriately
- Use filters when possible: Combine pagination with filtering to reduce the total number of pages needed