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

Parameters: search_titles
NameTypeDescription
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
curl "https://cotlet.dev/api/v1/trakt/titles/search?query=query" \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("trakt", "search_titles", {"query":"query"})
Node.js
const result = await cotlet.call('trakt', 'search_titles', {"query":"query"});
CLI
cotlet call trakt search_titles --data '{"query":"query"}'

Example response

JSON

{
  "results": [
    {
      "type": "movie",
      "trakt_id": 548210,
      "title": "Past Lives",
      "year": 2023
    },
    {
      "type": "show",
      "trakt_id": 401992,
      "title": "Slow Horses",
      "year": 2022
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.