# Google Books Search API Documentation

<p><strong>Google Books Search API</strong> finds books by keyword and by author, title, publisher, subject or ISBN, alone or together. Each book has <code>id</code>, <code>title</code>, <code>subtitle</code>, <code>authors</code>, <code>publisher</code>, <code>published_date</code>, <code>description</code>, <code>page_count</code>, <code>print_type</code>, <code>isbn_10</code>, <code>isbn_13</code>, <code>language</code>, <code>categories</code>, <code>average_rating</code>, <code>viewability</code> (full, partial, none or unknown), <code>embeddable</code>, <code>open_access</code>, <code>price</code>, <code>thumbnail_url</code>, <code>cover_url</code>, <code>info_url</code>, <code>preview_url</code> and <code>buy_url</code>. The answer has <code>total_results</code> (an estimate by Google Books), <code>page</code>, <code>limit</code>, <code>has_next</code> and <code>items</code>. Page 2 starts where page 1 ends. Google Books lists about the first 440 results of a search, so narrow broad searches with author, title or subject. <code>free_only=true</code> returns only books that you can read in full.</p><p><strong>Not available:</strong> Google Books does not offer language, print type (magazines, newspapers), ebooks-only, sort order, ratings count or related books on the data this API uses. The parameters <code>language</code>, <code>print_type</code>, <code>ebooks</code> and <code>sort</code> are rejected with a 422 error, never ignored. A field that Google Books does not show for a book is left out. Prices follow the location of the request, not the location of the caller.</p><p><strong>Credits:</strong> 1 credit per successful request. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/google-books-api/google_books_search](https://scrappa.co/docs/google-books-api/google_books_search)
- **API group:** Google Books API
- **Endpoint:** `GET https://scrappa.co/api/google/books/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 |
| --- | --- | --- | --- |
| `q` | string | No | Search text. Send at least one of q, author, title, publisher, subject or isbn. Example: dune. |
| `author` | string | No | Author name. Example: frank herbert. |
| `title` | string | No | Words in the title. |
| `publisher` | string | No | Publisher name. |
| `subject` | string | No | Subject or category. Example: science fiction. |
| `isbn` | string | No | ISBN-10 or ISBN-13, hyphens allowed. |
| `free_only` | boolean | No | true returns only books that you can read in full for free. |
| `page` | integer | No | One-based page number, 1 to 1000 (default 1). |
| `limit` | integer | No | Books per page, 1 to 20 (default 20). |

## Example response

```json
{
    "data": {
        "page": 1,
        "items": [
            {
                "id": "mztRPgAACAAJ",
                "title": "Le Messie de Dune",
                "authors": [
                    "Frank Herbert"
                ],
                "isbn_10": "2724212983",
                "isbn_13": "9782724212983",
                "info_url": "https://books.google.com/books?id=mztRPgAACAAJ",
                "language": "fr",
                "subtitle": "(suivi de) Les Enfants de Dune : roman",
                "cover_url": "https://books.google.com/books/content?id=mztRPgAACAAJ&printsec=frontcover&img=1&zoom=1",
                "categories": [
                    "Dune (Imaginary place)"
                ],
                "embeddable": false,
                "page_count": 668,
                "print_type": "book",
                "open_access": false,
                "preview_url": "https://books.google.com/books?id=mztRPgAACAAJ&printsec=frontcover",
                "viewability": "none",
                "published_date": "1982"
            },
            {
                "id": "0-D7DwAAQBAJ",
                "price": [
                    {
                        "type": "list",
                        "amount": 10.99,
                        "currency": "EUR"
                    },
                    {
                        "type": "retail",
                        "amount": 10.99,
                        "currency": "EUR"
                    }
                ],
                "title": "Dune - Tome 4 L'Empereur-Dieu de Dune",
                "authors": [
                    "Frank Herbert"
                ],
                "buy_url": "https://play.google.com/store/books/details?id=0-D7DwAAQBAJ&rdid=book-0-D7DwAAQBAJ&rdot=1",
                "isbn_10": "222112751X",
                "isbn_13": "9782221127513",
                "info_url": "https://books.google.com/books?id=0-D7DwAAQBAJ",
                "language": "fr",
                "cover_url": "https://books.google.com/books/content?id=0-D7DwAAQBAJ&printsec=frontcover&img=1&zoom=1",
                "publisher": "Robert Laffont",
                "categories": [
                    "Fiction"
                ],
                "embeddable": true,
                "page_count": 515,
                "print_type": "book",
                "description": "Le quatri\u00e8me tome du chef-d'\u0153uvre absolu de la science-fiction, adapt\u00e9 au cin\u00e9ma par Denis Villeneuve. \u00c9dition du cinquantenaire, traduction revue et corrig\u00e9e.",
                "open_access": false,
                "preview_url": "https://books.google.com/books?id=0-D7DwAAQBAJ&printsec=frontcover",
                "viewability": "partial",
                "thumbnail_url": "https://books.google.com/books/content?id=0-D7DwAAQBAJ&printsec=frontcover&img=1&zoom=5",
                "published_date": "2020-09-24"
            }
        ],
        "limit": 2,
        "query": "inauthor:\"frank herbert\" intitle:dune",
        "has_next": true,
        "total_results": 104
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, invalid or not supported. This response is not billable. |
| 503 | Upstream Unavailable | Google Books could not be reached after several tries. This response is not billable and is retryable. |

## 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)
