Search titles
Find movies and shows by title and year, with Trakt IDs.
GET https://cotlet.dev/api/v1/trakt/titles/search
read
Returns matches for a text query, best match first, each with its Trakt ID, title, year and type. Use the ID in the write tools when a title has several matches. Returns at most one page of results per call.
Parameters
| Name | Type | Description |
|---|---|---|
| query string required | string | Title to look for. |
| type string | string | 'movie' or 'show'. Default: both. |
| year integer | integer | Release year, to separate titles with the same name. |
Request
curl "https://cotlet.dev/api/v1/trakt/titles/search?query=query" \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("trakt", "search_titles", {"query":"query"}) const result = await cotlet.call('trakt', 'search_titles', {"query":"query"}); cotlet call trakt search_titles --data '{"query":"query"}' Example response
{
"results": [
{
"type": "movie",
"trakt_id": 548210,
"title": "Past Lives",
"year": 2023
},
{
"type": "show",
"trakt_id": 401992,
"title": "Slow Horses",
"year": 2022
}
]
}