Popular books on a subject (e.g. history, programming, romance)

Lists popular books for a subject, e.g. science, history, romance, programming.

Request

GEThttps://books.p.apihiver.com/v1/subjects/science?limit=2
Number. Maximum number of results (1–50, default 12).
Language
Client
1curl --request GET \
2  --url 'https://books.p.apihiver.com/v1/subjects/science?limit=2' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

Popular books on a subject (e.g. history, programming, romance): Books API reference

Lists popular books for a subject, e.g. `science`, `history`, `romance`, `programming`. This endpoint is part of the Books API: Search millions of books by title, author or subject, look up any ISBN, and find authors — powered by Open Library.

Example response (200, application/json)

Success.

1{
2  "books": [
3    {
4      "url": "https://openlibrary.org/works/OL362427W",
5      "cover": "https://covers.openlibrary.org/b/id/8257991-M.jpg",
6      "title": "Romeo and Juliet",
7      "authors": [
8        "William Shakespeare"
9      ],
10      "first_published": 1597
11    },
12    {
13      "url": "https://openlibrary.org/works/OL52266W",
14      "cover": "https://covers.openlibrary.org/b/id/6419199-M.jpg",
15      "title": "The Invisible Man",
16      "authors": [
17        "H. G. Wells"
18      ],
19      "first_published": 0
20    }
21  ],
22  "subject": "science",
23  "total_works": 105678
24}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "A parameter has the wrong format — the message names it."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.