Searching for content in the API
Last Updated May 2, 2025
GuideWhat can I search for?
Currently, you can search for authors, books, characters, lists, prompts, publishers, series, and users. Additional search options will be added in the future.
Behind the scenes, Hardcover uses Typesense for search. This same Typesense index used on the website is used for this endpoint.
The search API does not currently support filtering by parameters besides query
, however you can
change which attributes (columns) are searched as well as changing sorting.
Search options
Only query
is required. If all other fields are blank, this will default to the same search as the Hardcover website when searching for a book.
query
* - The search termquery_type
- The type of content to search for one of (case-insensitive; defaultbook
)author
book
character
list
prompt
publisher
series
user
per_page
- The number of results to return per page (default 25)page
- The page number to return (default 1)sort
- What attributes should the result be sorted byfields
- Which attributes within the givenquery_type
to include in the searchweights
- A comma separated list of numbers indicating weights to give each of thefields
when calculating match
Available fields
ids
- Array ofid
attributes for results in orderresults
- Result objects returned from Typesensequery
- Passed inquery
, or defaultquery_type
- Passed inquery_type
, or defaultpage
- Passed inpage
, or defaultper_page
- Passed inper_page
, or default
Example searches
Authors
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
alternate_names
- Alternative names for the authorbooks
- Titles of the top 5 most popular books by this authorbooks_count
- Number of books by this authorimage
- Image object containing image URL, dimensions, color, etc.name
- The name of the authorname_personal
- The personal name of the authorseries_names
- The names of the different series the author has writtenslug
- The URL slug of this author
Defaults
When searching authors, we use the following default values.
fields
:name,name_personal,alternate_names,series_names,books
sort
:_text_match:desc,books_count:desc
weights
:3,3,3,2,1
query BooksByRowling { search( query: "rowling", query_type: "Author", per_page: 5, page: 1 ) { results } }
Books
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
activities_count
- Number of activities for this bookalternative_titles
- Alternative titles for the bookaudio_seconds
- Number of seconds for the default audiobook editionauthor_names
- The name of the authors or contributors of the bookcompilation
- Boolean if this book is a compilationcontent_warnings
- Top 5 content warningscontribution_types
- Array of contribution types for contributionscontributions
- Array of contribution objectscover_color
- The extracted color of the book (ex:red
,green
)description
- The description of the bookfeatured_series
- Object containing information about the seriesfeatured_series_position
- Number indicating the featured series positiongenres
- Top 5 genresisbns
- The ISBNs of the booklists_count
- Number of lists this book is onhas_audiobook
- Boolean if known to have an audiobookhas_ebook
- Boolean if known to have an ebookmoods
- Top 5 moodspages
- Number of pages of the default physical editionprompts_count
- Number of prompts this book is onrating
- Hardcover average ratingratings_count
- Number of Hardcover ratingsrelease_date_i
- The release date as an integerrelease_year
- Date the book was publishedreviews_count
- Number of Hardcover reviewsseries_names
- The name of the series the book belongs toslug
- The URL slug of the booksubtitle
- The subtitle of the booktags
- Top 5 tagstitle
- The title of the bookusers_count
- Number of Hardcover users who have saved this bookusers_read_count
- Count of users who have marked this book as read
Defaults
When searching books, we use the following default values.
fields
:title,isbns,series_names,author_names,alternative_titles
sort
:_text_match:desc,users_count:desc
weights
:5,5,3,1,1
query LordOfTheRingsBooks { search( query: "lord of the rings", query_type: "Book", per_page: 5, page: 1 ) { results } }
Characters
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
author_names
- The name of the author who wrote the books the character appears inbooks
- A list of book titles with release year the character appears in (only includes books for which this character being present is not considered a spoiler)books_count
- Total number of books this character has been inname
- The name of the characterobject_type
- The string “Character”slug
- The URL slug for this character
Defaults
When searching characters, we use the following default values.
fields
:name,books,author_names
sort
:_text_match:desc,books_count:desc
weights
:4,2,2
query CharactersNamedPeter { search( query: "peter", query_type: "Character", per_page: 5, page: 1 ) { results } }
Lists
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
description
- The description of the listbooks
- Titles of the first 5 booksbooks_count
- Number of books in this listlikes_count
- Number of likes for this listobject_type
- The string “List”name
- The name of the listslug
- The URL slug of the listuser
- User object of the list owner
Defaults
When searching lists, we use the following default values.
fields
:name,description,books
sort
:_text_match:desc,likes_count:desc
weights
:3,2,1
query ListsNamedBest { search( query: "best", query_type: "List", per_page: 5, page: 1 ) { results } }
Prompts
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
answers_count
- Number of total upvote answersbooks
- Titles of the top 5 most upvoted books for this promptbooks_count
- Number of unique books upvotedquestion
- The prompt questionslug
- The URL sluguser
- User object of the prompt creatorusers_count
- Number of users who have answered this prompt
Defaults
When searching prompts, we use the following default values.
fields
:question,books
sort
:_text_match:desc
weights
:2,1
query PromptsAboutLearning { search( query: "learn from", query_type: "Prompt", per_page: 5, page: 1 ) { results } }
Publishers
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
editions_count
- Number of editions with this publishername
- The name of the publisherobject_type
- The string “Publisher”slug
- The URL slug of the publisher
Defaults
When searching publishers, we use the following default values.
fields
:name
sort
:_text_match:desc,editions_count:desc
weights
:1
query PublishersNamedPenguin { search( query: "penguin", query_type: "Publisher", per_page: 5, page: 1 ) { results } }
Series
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
author_name
- The name of the primary author who wrote the seriesauthor
- Author objectbooks_count
- Number of books in this seriesbooks
- A list of books in the seriesname
- The name of the seriesprimary_books_count
- Number of books in this series with an Integer position (1, 2, 3; exlcludes 1.5, empty)readers_count
- Sum ofbooks.users_read_count
for all books in this series (not distinct, so readers will be counted once per book)slug
- The URL slug of the series
Defaults
When searching series, we use the following default values.
fields
:name,books,author_name
sort
:_text_match:desc,readers_count:desc
weights
:2,1,1
query SeriesNamedHarryPotter { search( query: "harry potter", query_type: "Series", per_page: 7, page: 1 ) { results } }
Users
The following fields are available in the returned object. You can also sort
by any of these, or limit you search to specific field(s) using fields
and weights
.
books_count
- Number of books in this users library (any status)flair
- Custom flair for this userfollowed_users_count
- Number of users this user followsfollowers_count
- Number of followers for this userimage
- Image objectlocation
- The location of the username
- The name of the userpro
- Boolean if a supporterusername
- The username of the user
Defaults
When searching users, we use the following default values.
sort
:_text_match:desc,followers_count:desc
fields
:name,username,location
weights
:2,2,1
query UsersNamedAdam { search( query: "adam", query_type: "User", per_page: 5, page: 1 ) { results } }