book2rec API

Simple, secure API for generating book recommendations based on a book you loved reading.

Authentication

All API requests require an API key passed via HTTP headers.

How to get an API key
  1. Sign in with Google
  2. Go to My Books page
  3. Click on Generate API KEY button
  4. Copy generated API KEY
How to use your API key
X-API-KEY: your_api_key_here

Base URL

https://book2rec.com/mcp

Example Request

Endpoint
POST
Request Body
{
    "book": "Midnight's Children"
}
curl
curl -X POST https://book2rec.com/mcp \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key_here" \
  -d '{
    "book": "Midnight's Children"
  }'

Example Response

{
    "message": "Success",
    "result": [
        {
            "Similarity Score": 72.42,
            "Book Title": "The Secret River",
            "Book Author": "Kate Grenville",
            "Amazon Purchase Link": "https://www.amazon.com/dp/B002RI9UCC/?tag=b2r05-20",
            "Book2Rec Book Page": "https://book2rec/book/9df2ddab-b19c-449b-8deb-696a6e951f26",
            "Booker Prize Shortlist": true,
            "Reason for Similarity": "Both novels explore complex themes of identity, cultural conflict, and personal journeys against rich historical backdrops. Their use of metaphor and reflection on the human experience connects individual stories to broader social narratives, justifying the similarity score."
        },
        {
            "Similarity Score": 71.45,
            "Book Title": "House Made of Dawn",
            "Book Author": "N. Scott Momaday",
            "Amazon Purchase Link": "https://www.amazon.com/dp/0062909959/?tag=b2r05-20",
            "Book2Rec Book Page": "https://book2rec/book/11ca73b4-71ce-4d10-9715-87dd33ef9a05",
            "Pulitzer Prize for Fiction": true,
            "Reason for Similarity": "Both novels explore complex themes of identity, cultural conflict, and personal journeys against rich historical backdrops. Their use of metaphor and reflection on the human experience connects individual stories to broader social narratives, justifying the similarity score."
        },
        {
            "Similarity Score": 68.75,
            "Book Title": "Parrot and Olivier in America",
            "Book Author": "Peter Carey",
            "Amazon Purchase Link": "https://www.amazon.com/dp/0307476014/?tag=b2r05-20",
            "Book2Rec Book Page": "https://book2rec/book/b8f1abb2-9ad1-4fbc-bc64-05978f7596fc",
            "Booker Prize Shortlist": true,
            "Reason for Similarity": "Both novels explore complex themes of identity, cultural conflict, and personal journeys against rich historical backdrops. Their use of metaphor and reflection on the human experience connects individual stories to broader social narratives, justifying the similarity score."
        }
    ]
}

Errors

400  Bad Request
401  API key required            
403  Invalid API key
429  Daily rate limit exceeded
500  Server Error

Rate Limits

To ensure fair usage, API requests are rate limited per API key.

  • Daily limit: 20 requests per API key
  • Reset: Limits reset every 24 hours (UTC)

Need higher limits? Contact sandy@book2rec.com.