The following Python example demonstrates how to create a new book, check the initial hitCount, finalize it, and poll the hitCount over time to observe buyer activity.
For production use, implement comprehensive error handling for 401, 429, and network timeout scenarios. See Monitor rate limits, API endpoints error codes, and API endpoints parameters for details.
Create and track book views
The following Python example demonstrates how to create a new book, check the initial hitCount, finalize it, and track the hitCount as simulated views are made.
List books with client-side title sort
The following JavaScript example demonstrates how to retrieve a list of books sorted by creation date and then sort them by title on the client side.
Handle removed title sorting
The following Java example demonstrates how to handle an error when attempting to use the removed sort=title parameter in the BookHub Publisher API v2. The API will return a 400 Bad Request error with a message indicating that only sort=createdDate is supported.
The following PHP example demonstrates how to retrieve a list of active books, check their hitCount, and identify high-performing books with more than 500 views.
Next steps
Explore related topics:
Conceptual guides
How-to guides
Reference
- Release notes — Explore all changes in BookHub Publisher API v2.
- API endpoints — Explore all available API endpoints and their parameters for BookHub Publisher API v2.
Last modified on August 18, 2026