API reference · Search engines
Google Books Search
Search Google Books using a title, author or keyword query. Book discovery does not include unrestricted book downloads.
Example
BASH
curl -X POST 'https://api.serpbase.dev/google/books' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"query":"clean code"}'Response · real, shortened
{
"status": 0,
"credits_charged": 1,
"request_id": "r-4b27fe8a36d9ac303a5da7dd",
"product_id": "google_books_search",
"query": "clean code",
"organic": [
{
"date": "2009",
"display_link": "books.google.com › books",
"display_url": "books.google.com › books",
"link": "https://books.google.com/books?id=hjEFCAAAQBAJ&printsec=frontcover&dq=clean+code&hl=en&newbks=1&newb…",
"position": 1,
"published_at": "2009",
"rank": 1,
"sitelinks": [
{
"display_url": "books.google.com",
"link": "https://books.google.com/books?id=hjEFCAAAQBAJ&printsec=frontcover&dq=clean+code&hl=en&newbks=1&newb…",
"source_url": "https://books.google.com/books?id=hjEFCAAAQBAJ&printsec=frontcover&dq=clean+code&hl=en&newbks=1&newb…",
"title": "Preview",
"url": "https://books.google.com/books?id=hjEFCAAAQBAJ&printsec=frontcover&dq=clean+code&hl=en&newbks=1&newb…"
}
],
"snippet": "This title shows the process of cleaning code.",
"source_url": "https://books.google.com/books?id=hjEFCAAAQBAJ&printsec=frontcover&dq=clean+code&hl=en&newbks=1&newb…",
"title": "Clean Code: A Handbook of Agile Software Craftsmanship",
"url": "https://books.google.com/books?id=hjEFCAAAQBAJ&printsec=frontcover&dq=clean+code&hl=en&newbks=1&newb…"
},
{
"display_link": "books.google.com › books",
"display_url": "books.google.com › books",
"link": "https://books.google.com/books?id=Gwdx0QEACAAJ&dq=clean+code&hl=en&newbks=1&newbks_redir=1&sa=X&ved=…",
"position": 3,
"rank": 2,
"sitelinks": [
{
"display_url": "books.google.com",
"link": "https://books.google.com/books?id=Gwdx0QEACAAJ&dq=clean+code&hl=en&newbks=1&newbks_redir=1&sa=X&ved=…",
"source_url": "https://www.google.com/books/edition/Clean_Code/Gwdx0QEACAAJ?hl=en&gl=us&kptab=editions&sa=X&ved=2ah…",
"title": "More editions",
"url": "https://books.google.com/books?id=Gwdx0QEACAAJ&dq=clean+code&hl=en&newbks=1&newbks_redir=1&sa=X&ved=…"
}
],
"snippet": "This new edition of the classic guide to software craftsmanship --a comprehensive rewrite of the ori…",
"source_url": "https://books.google.com/books?id=Gwdx0QEACAAJ&dq=clean+code&hl=en&newbks=1&newbks_redir=1&sa=X&ved=…",
"title": "Clean Code: A Handbook of Agile Software Craftsmanship",
"url": "https://books.google.com/books?id=Gwdx0QEACAAJ&dq=clean+code&hl=en&newbks=1&newbks_redir=1&sa=X&ved=…"
}
],
"page": 1,
"related_searches": [
"inauthor:\"Robert C. Martin\"",
"inauthor:\"Robert Martin\""
],
"result_stats": "About 5,780,000 results (0.66s)",
"search_type": "search"
}Parameters
NameWhat it does
format"json" | "markdown"
json (default) returns the parsed result.
More
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
querystring
Example: "clean code"
The sample shows example parameters, not the complete request contract. Known fields are validated by the API; additional parameters are allowed.
What comes back
The fields are those in the response above; every endpoint also carries status, credits_charged and request_id.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry