hitCount increments each time a buyer retrieves the book via GET /v2/books/{bookId}. Requests authenticated with publisher credentials do not increment the count. Use it to track the popularity and performance of books over time.
The
hitCount field is available only in v2. It is not supported in v1.hitCount to measure interest in specific titles, such as tracking post-campaign API calls to assess marketing impact and make data-driven decisions about inventory and pricing.
How it works
ThehitCount field is read-only and initially set to 0 when a book is created. Each time customers retrieve the book’s details via the GET /v2/books/{bookId} endpoint, the hitCount increments by 1. This count is cumulative and persists throughout the book’s lifetime, allowing you to track its performance over time.
The hitCount field is updated in real time and reflects the total number of times an API call accessed the book’s details. Updates typically appear within seconds; this isn’t a guaranteed SLA. Client-side caching using If-None-Match and ETag headers returns a 304 Not Modified response without incrementing hitCount, since the server returns 304 without invoking the API call’s tracking logic.
Each API call from the same customer increases the hitCount, since it tracks total API requests rather than unique users. However, API calls made by publishers do not affect the hitCount, as these requests are authenticated with your publisher credentials and do not represent buyer-facing traffic.
For error responses and rate limit details, see Error codes.
When you retrieve a book’s details using the GET /v2/books/{bookId} endpoint, the response includes the hitCount field, allowing you to see how many times a customer’s API call retrieved the book’s details. The following example shows a full response, including the hitCount:
Get a specific book request example
Get a specific book response example
GET /v2/books/{bookId} endpoint.
Next steps
Explore related topics:How-to guides
- Rank books by hitCount to find top performers — Use the
hitCountfield to rank books by buyer interest and flag your top performers.
Reference
- Endpoint coverage for the
hitCountfield — Learn which BookHub Publisher API endpoints include thehitCountfield in their responses. - Get a specific book — Learn about the
GET /v2/books/{bookId}endpoint, including thehitCountfield. - Track high-performing books with
hitCount— Example code for using thehitCountfield in PHP. - Error codes — Understand the error codes returned by the BookHub Publisher API.