Subject Data API

Subject Data API

Subject Data API Details

The Subject Data API returns subject records: the topic, theme and keyword headings attached to books, with how many editions carry each one. Look a subject up by name or by ISBNLab id.

Available on the Standard and Pro plans. See Pricing.

To try out the Subject Data API, see the API Documentation

To learn more about the API and how it works, see the API Information

API Documentation API Information

Endpoints

  • GET /api/subject/search/{search} — the best match for a name or slug.
  • GET /api/subject/{id} — a subject by ISBNLab id.

Search answers with the single best match, ignoring case and punctuation. No match is a 404.

Subject Data API Request CURL Example

curl -X 'GET' \
  'https://www.isbnlab.com/api/subject/search/science%20fiction' \
  -H 'accept: application/ld+json' \
  -H 'Authorization: Bearer {API_TOKEN}'

Subject Data API Response Example

{
    "@context": "/api/contexts/Subject",
    "@id": "/api/subject/search/science%20fiction",
    "@type": "Subject",
    "name": "Science Fiction",
    "identifier": "930f5e6af9b1b1dbb8d9fad80faa40e8",
    "slug": "science-fiction",
    "firstChar": "s",
    "editionCount": 80975
}

Subject Data API Response Fields

FieldTypeDescription
namestringSubject name.
slugstringURL-safe key for the subject. Matches the slug in a book's subjects list.
identifierstringIdentifier for the subject.
firstCharstringFirst character of the name, for A–Z listings.
editionCountintegerNumber of editions in the catalog with this subject.