Skip to main content

API Access

Book Report’s API lets external software tools and automations securely access your data. Any number that you can find on Book Report’s Historical Tab can also be accessed through the API, in a format that's easy for other pieces of software to understand and automate.

This page serves as a friendly introduction to what an API can do. It covers only a small part of what Book Report’s API can do. Full technical documentation can be found on the Book Report API reference page. The raw OpenAPI document is also available for coding agents, OpenAPI-aware tools, and generated clients.

Legacy pricing

If you are on legacy pricing, your first API request will begin a 90-day free trial. Your legacy subscription keeps the features that existed before February 2025. API Access is part of the new feature set, so keeping this feature after the trial will require moving to current pricing.

An Example

The core of using an API correctly is to decide what request you want to make, based on what data you are looking for. Within your request, you embed the details of what data you want sent back. Do you want an all-time report, or just the last week? Do you want your data broken down by book, or by marketplace, or both? Book Report’s API has many options, so you can always get exactly the data you’re looking for.

Let’s say I know exactly what data I’m looking for. I want:

  • Data from the month of January, 2026.
  • Money converted into Canadian dollars.
  • One row for each book.
  • Earnings, sales, and borrows.

I would ask for that exact report by sending this JSON in a POST request to https://app.getbookreport.com/api/v1/report:

{
"start": "2026-01-01",
"end": "2026-01-31",
"currency": "CAD",
"attributes": ["book"],
"metrics": ["earnings", "sales", "borrows"]
}

You can see how each part of the JSON relates back to a bullet point above.

In response to that request, I'd receive something like this:

{
"meta": { ... },
"columns": [
{"key": "book", "kind": "attribute", "type": "string"},
{"key": "earnings", "kind": "metric", "type": "number", "currency": "CAD"},
{"key": "sales", "kind": "metric", "type": "number"},
{"key": "borrows", "kind": "metric", "type": "number"}
],
"rows": [
{"book": "A Tangled Tale", "earnings": 686.99, "sales": 116, "borrows": 49.34},
{"book": "A Study in Scarlet", "earnings": 674.14, "sales": 110, "borrows": 46.46},
{"book": "The White Company", "earnings": 649.81, "sales": 93, "borrows": 33.74},
{"book": "Sense and Sensibility", "earnings": 638.41, "sales": 93, "borrows": 33.74},
{"book": "Sylvie and Bruno", "earnings": 584.78, "sales": 91, "borrows": 33.91}
]
}

By adapting the parts of the JSON, you can receive exactly the data you need. This page is meant to help that JSON make sense; the API reference is the source of truth for every accepted parameter, endpoint, response schema, and error code.

Authentication

From Book Report’s Settings Tab, you can create an API key.

api key

When making a request to our API, include your API key as an HTTP header, like so:

Authorization: Bearer YOUR_API_KEY_HERE

Specifically, the header name should be set to Authorization and the header value should be set to Bearer YOUR_API_KEY_HERE.

Be careful with your API key

Anyone who knows your API key has full access to all sales data available to your account, including data shared with you. Store it somewhere safe; be careful while screensharing; and only ever share it with someone if you trust them with all your data, and trust them to be careful not to leak your key further.

Damage Control

If your API key has gotten into the wrong hands, immediately visit Book Report’s Settings Tab and revoke that API key. This will prevent the bad actor from accessing any more of your data - although any data they’ve already gotten cannot be taken back.

Request Example

In a JavaScript environment, a complete request may look something like this:

fetch('https://app.getbookreport.com/api/v1/report', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY_HERE',
'Content-Type': 'application/json',
},
body: JSON.stringify({
range: 'last_30_days',
attributes: ['book', 'month'],
metrics: ['earnings', 'sales', 'borrows'],
currency: 'USD',
}),
})
.then(r => r.json())
.then(console.log)
.catch(console.error);

Be sure to replace YOUR_API_KEY_HERE with your actual key! For the complete list of endpoints and options, see the API reference.

Cross-Origin Resource Sharing

To facilitate simpler development of internal tooling, this API is available cross-origin. This makes it possible to build browser-based tools that access our API without the need for a server. Instead, your browser can make requests directly to Book Report’s servers, regardless of the domain the requests are coming from. Authorization headers and browser preflight requests are supported.