/search/tmdb/:id endpoint empty array issue

Hi,

In the last 24 hours, I can no longer access many TV shows that I could normally access using the “/search/tmdb/:id” endpoint.

For example, this TV show is available on Trakt and TMDb:

But when I use this endpoint (“/search/tmdb/100884?type=show”), I get an empty array response.

Hi,
I think this is related to the recent change in the search engine we are testing: Experimental Search Engine - Trakt / VIP Beta Features - Trakt Forums

Since it’s related to the api, I’ll ask a developer if this is happening because the data is still indexing or if it’s a bug related to that change.

It’s probably related to what you mentioned, but the problem seems to be solved now. If the problem occurs again, I’ll write.

I’ll have a fix out for this later today. If you’re using the new experimental engine, that is what has the bug.

Users can set which engine to use, but I’m talking about the “/search/tmdb/:id” endpoint. I used the endpoint without using accessToken.

Should work now. I pushed a fix and get results using your example search. The API GitHub is the best place for this, like you originally posted.

https://api.trakt.tv/search/tmdb/100884

[
  {
    "type":"show",
    "score":1000,
    "show":{
      "title":"Bäckström",
      "year":2020,
      "ids":{
        "trakt":158502,
        "slug":"backstrom-2020",
        "tvdb":377395,
        "imdb":"tt10068932",
        "tmdb":100884,
        "tvrage":null
      },
      "aired_episodes":18
    }
  }
]

Hi @justin unfortunately it’s still not fixed.

I noticed the problem is when we add the type parameter. For example this works GET /search/tmdb/73457

but this one fails GET /search/tmdb/73457?type=person

It would be great if you handle that extra parameter so it doesn’t break all existing apps that use it. It started failing in FilmNoir today for example.

Thanks

@Justin I thought it was fixed too, but I guess there are still many items that haven’t been indexed.
For example: “/search/tmdb/258190?type=show”
It would be better if the new engine was not used before indexing was completed for this endpoint.

You mentioned not sending an access token, so the new engine would not be used. The indexing is also done.

Are these authed calls?

@Justin

If the index is complete as I said above, why does this request return an empty array? Could there be another error?
“/search/tmdb/258190?type=show”

I would need a more specific API example and info about any auth being sent. The new engine would only be used if you’re sending an access token for a vip user.

@Justin Sorry, I am sending extended=full. I wonder if it is caused by the cache.

curl --location ‘https://api.trakt.tv/search/tmdb/258190?type=show&extended=full’ \

–header ‘Content-Type: application/json’ \

–header ‘trakt-api-version: 2’ \

–header 'trakt-api-key: ’

Facing same issue, similar thread here Querying using IMDB on some titles yields no results, mean while TMDB does

1 Like

I pushed a potential fix for this. Cached results might take up to 8 hours to expire.

Thanks, everything’s working now