# Goodreads Book Search API Documentation

Search the public Goodreads catalog by keyword: for each result the book id, title, url, author, average rating, ratings count, published year, cover image, editions count and a 1-based position. Page with the 1-based page parameter; has_more is true while more pages exist. A valid empty search result is a successful response.

- **Documentation:** [https://scrappa.co/docs/goodreads-api/goodreads_search](https://scrappa.co/docs/goodreads-api/goodreads_search)
- **API group:** Goodreads API
- **Endpoint:** `GET https://scrappa.co/api/goodreads/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search query, e.g. the lord of the rings. |
| `page` | integer | No | 1-based page number, 20 results per page. Defaults to 1. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/goodreads/search?query=the+lord+of+the+rings&page=1"
```

## Example response

```json
{
    "success": true,
    "data": {
        "page": 1,
        "per_page": 20,
        "total": 2368,
        "has_more": true,
        "results": [
            {
                "position": 1,
                "id": "61215351",
                "title": "The Fellowship of the Ring (The Lord of the Rings, #1)",
                "url": "https://www.goodreads.com/book/show/61215351-the-fellowship-of-the-ring",
                "author": "J.R.R. Tolkien",
                "average_rating": 4.41,
                "ratings_count": 3246470,
                "published_year": 1954,
                "cover_url": "https://i.gr-assets.com/images/S/compressed.photo.goodreads.com/books/1654215925i/61215351._SY75_.jpg",
                "editions_count": 142
            }
        ]
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The query parameter is missing or invalid. This response is not billable. |
| 503 | Upstream Unavailable | Goodreads is temporarily unreachable or blocked the request. Retry later; this response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
