Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mohameodo/nano/llms.txt
Use this file to discover all available pages before exploring further.
/api/search queries the TMDB API for both movies and TV shows simultaneously, merges the results, and sorts them by popularity. It is the backbone of nano’s search bar and can be called directly to build custom search experiences against your nano instance.
Request
Method:GETPath:
/api/search
The search query string. If empty or omitted, the endpoint returns
{ results: [], total_pages: 1 } immediately without calling TMDB.Page number for paginated results. Passed directly to TMDB’s search API.
TMDB language code for localized results (e.g.
en, fr, es, de). When omitted, TMDB returns its default language.Response
Content-Type:application/json
Array of result objects. Movies and TV shows are mixed together and sorted by
popularity descending.Total number of result pages available from TMDB. Use the
page parameter to paginate through them. When the fallback list is returned, this is always 1.Example
Fallback Behavior
If TMDB returns no results (e.g. an unusual query with zero hits) or if the TMDB request fails entirely,/api/search falls back to a built-in static list of popular titles and filters it by the search query string. The fallback list contains:
| Title | TMDB ID | Type |
|---|---|---|
| Inception | 27205 | movie |
| Interstellar | 157336 | movie |
| The Dark Knight | 155 | movie |
| Breaking Bad | 1396 | tv |
| Stranger Things | 66732 | tv |
| Wednesday | 119051 | tv |
| Squid Game | 93405 | tv |
total_pages: 1.
Submitting an empty
q parameter (e.g. /api/search?q=) returns { "results": [], "total_pages": 1 } immediately. The TMDB API is never called in this case, so there is no latency cost.