Here’s a clean, ready-to-send bug report in English using your details:
Describe the Bug
For video results, the thumbnail_url field sometimes contains the video page URL (e.g., a YouTube watch URL) instead of a direct image URL to the thumbnail. This makes it impossible to render a thumbnail image from the API response.
Expected Behavior
thumbnail_url should always be a direct, fetchable image URL (e.g., a JPG/PNG) representing the video’s thumbnail.
Example for YouTube: https://img.youtube.com/vi/<VIDEO_ID>/hqdefault.jpg (or maxresdefault.jpg when available).
Actual Behavior
thumbnail_url is set to the same value as url (the video’s page), e.g.:
[
{
"url": "https://www.youtube.com/watch?v=mz9vajYkB48",
"thumbnail_width": 480,
"thumbnail_height": 360,
"thumbnail_url": "https://www.youtube.com/watch?v=mz9vajYkB48"
},
{
"url": "https://www.youtube.com/watch?v=IXemJXAE8pI",
"thumbnail_width": 480,
"thumbnail_height": 360,
"thumbnail_url": "https://www.youtube.com/watch?v=IXemJXAE8pI"
},
{
"url": "https://www.youtube.com/watch?v=SYTYiTMqN38",
"thumbnail_width": 480,
"thumbnail_height": 360,
"thumbnail_url": "https://www.youtube.com/watch?v=SYTYiTMqN38"
}
]
Steps to Reproduce
-
Call the API endpoint that returns video answers (e.g., a query that yields YouTube results). (like
curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header 'Authorization: Bearer YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "model": "sonar", "messages": [ { "role": "user", "content": "harry potter" }, { "role": "user", "content": "How many stars are there in our galaxy?" } ], "search_mode": "web", "reasoning_effort": "low", "max_tokens": 123, "temperature": 0.2, "top_p": 0.9, "language_preference": "<string>", "search_domain_filter": [ "<any>" ], "return_images": false, "return_related_questions": false, "search_recency_filter": "<string>", "search_after_date_filter": "<string>", "search_before_date_filter": "<string>", "last_updated_after_filter": "<string>", "last_updated_before_filter": "<string>", "top_k": 0, "stream": false, "presence_penalty": 0, "frequency_penalty": 0, "response_format": {}, "disable_search": false, "enable_search_classifier": false, "web_search_options": { "search_context_size": "high", "image_search_relevance_enhanced": false }, "media_response": { "overrides": { "return_videos": true, "return_images": true } } }'Inspect the returned objects for
thumbnail_url. -
Observe that
thumbnail_urlequals theurl(the watch page), not an image file.
Logs or Screenshots (if applicable)
{"id": "8c98c183-a1be-4d7c-8c4f-3f9e1450e13a", "model": "sonar", "created": 1760610301, "usage": {"prompt_tokens": 4, "completion_tokens": 638, "total_tokens": 642, "search_context_size": "low", "cost": {"input_tokens_cost": 0.0, "output_tokens_cost": 0.001, "request_cost": 0.005, "total_cost": 0.006}}, "citations": ["https://www.aol.com/articles/actors-excited-magical-debut-harry-054509824.html", "https://myfox28columbus.com/good-day-columbus/gallery/harry-potter-and-the-cursed-child-makes-magical-debut-in-columbus-for-limited-two-week-run", "https://collider.com/tom-felton-biblical-epic-risen-netflix-streaming-november-2025/", "https://www.harrypotter.com", "https://en.wikipedia.org/wiki/Harry_Potter", "https://www.warnerbros.com/movies/harry-potter-complete-8-film-collection", "https://en.wikipedia.org/wiki/Harry_Potter_(film_series)", "https://www.imdb.com/title/tt0241527/", "https://kids.scholastic.com/kid/books/harry-potter/", "https://www.youtube.com/@harrypotter"], "search_results": [{"title": "Actors excited for magical debut in Harry Potter show", "url": "https://www.aol.com/articles/actors-excited-magical-debut-harry-054509824.html", "date": "2025-10-15", "last_updated": null, "snippet": "", "source": "web"}, {"title": "Harry Potter and the Cursed Child makes magical debut in Columbus for limited two-week run", "url": "https://myfox28columbus.com/good-day-columbus/gallery/harry-potter-and-the-cursed-child-makes-magical-debut-in-columbus-for-limited-two-week-run", "date": "2025-10-15", "last_updated": null, "snippet": "", "source": "web"}, {"title": "Harry Potter Star's Epic 'The Chosen' Replacement Resurrects on Streaming", "url": "https://collider.com/tom-felton-biblical-epic-risen-netflix-streaming-november-2025/", "date": "2025-10-15", "last_updated": "2025-10-15", "snippet": "", "source": "web"}, {"title": "Harry Potter | Official home of Harry Potter, Hogwarts Sorting, and ...", "url": "https://www.harrypotter.com", "date": "2020-07-15", "last_updated": "2025-10-16", "snippet": "", "source": "web"}, {"title": "Harry Potter - Wikipedia", "url": "https://en.wikipedia.org/wiki/Harry_Potter", "date": "2001-10-08", "last_updated": "2025-10-15", "snippet": "", "source": "web"}, {"title": "Harry Potter 8-Film Collection | Movies - WarnerBros.com", "url": "https://www.warnerbros.com/movies/harry-potter-complete-8-film-collection", "date": "2017-11-07", "last_updated": "2025-10-16", "snippet": "", "source": "web"}, {"title": "Harry Potter (film series) - Wikipedia", "url": "https://en.wikipedia.org/wiki/Harry_Potter_(film_series)", "date": "2006-10-26", "last_updated": "2025-10-12", "snippet": "", "source": "web"}, {"title": "Harry Potter and the Sorcerer's Stone (2001) - IMDb", "url": "https://www.imdb.com/title/tt0241527/", "date": "2001-11-16", "last_updated": "2025-10-16", "snippet": "", "source": "web"}, {"title": "Harry Potter - Scholastic Kids", "url": "https://kids.scholastic.com/kid/books/harry-potter/", "date": "2015-01-01", "last_updated": "2025-10-16", "snippet": "", "source": "web"}, {"title": "Harry Potter - YouTube", "url": "https://www.youtube.com/@harrypotter", "date": "2025-03-24", "last_updated": "2025-03-26", "snippet": "", "source": "web"}], "videos": [{"url": "https://www.youtube.com/shorts/ajbXnEQ-gyw", "thumbnail_width": 480, "thumbnail_height": 360, "thumbnail_url": "https://www.youtube.com/shorts/ajbXnEQ-gyw"}, {"url": "https://www.youtube.com/watch?v=jrvih1gSN4w", "thumbnail_width": 480, "thumbnail_height": 360, "thumbnail_url": "https://www.youtube.com/watch?v=jrvih1gSN4w"}, {"url": "https://www.youtube.com/watch?v=NYNJTLjve_g", "thumbnail_width": 480, "thumbnail_height": 360, "thumbnail_url": "https://www.youtube.com/watch?v=NYNJTLjve_g"}, {"url": "https://www.youtube.com/watch?v=5X2PvMo5ocw", "thumbnail_width": 480, "thumbnail_height": 360, "thumbnail_url": "https://www.youtube.com/watch?v=5X2PvMo5ocw"}, {"url": "https://www.youtube.com/watch?v=HRswCVPtSQk", "thumbnail_width": 480, "thumbnail_height": 360, "thumbnail_url": "https://www.youtube.com/watch?v=HRswCVPtSQk"}], "object": "chat.completion", "choices": [{"index": 0, "finish_reason": "stop", "message": {"role": "assistant", "content": "## Overview\n\n**Harry Potter** is a globally renowned fantasy series written by British author J.K. Rowling, consisting of seven novels that chronicle the life of a young wizard, Harry Potter, and his friends Ron Weasley and Hermione Granger as they attend Hogwarts School of Witchcraft and Wizardry[5]. The central narrative revolves around Harry\u2019s struggle against the dark wizard Lord Voldemort, who seeks immortality and domination over both the magical and non-magical (Muggle) worlds[5].\n\n## Series Structure and Themes\n\n- **Books**: The series includes *Harry Potter and the Philosopher\u2019s Stone* (1997), *Chamber of Secrets* (1998), *Prisoner of Azkaban* (1999), *Goblet of Fire* (2000), *Order of the Phoenix* (2003), *Half-Blood Prince* (2005), and *Deathly Hallows* (2007)[5].\n- **Genres**: The books blend fantasy, drama, coming-of-age, mystery, thriller, adventure, horror, and romance, set within the framework of a British boarding school story[5].\n- **Themes**: Major themes include prejudice, corruption, madness, love, death, and the battle between good and evil[5].\n\n## Popularity and Impact\n\n- **Sales**: With over 600 million copies sold worldwide as of 2023, the series is the best-selling book series in history[5].\n- **Cultural Impact**: The books have attracted readers of all ages and have become cornerstones of modern literature, though they have received mixed critical reviews[5].\n- **Adaptations**: The series has been adapted into a successful film franchise, a stage play (*Harry Potter and the Cursed Child*), video games, and a vast array of merchandise[6][7].\n- **Expanded Universe**: The Wizarding World has expanded into theme parks, a prequel film series (*Fantastic Beasts*), and interactive experiences like the official Harry Potter website, which offers sorting quizzes and more[4].\n\n## Film Series\n\nThe film adaptations, produced by Warner Bros., closely follow the books and were released between 2001 and 2011, starring Daniel Radcliffe as Harry Potter, Rupert Grint as Ron Weasley, and Emma Watson as Hermione Granger[7]. The films were both critical and commercial successes, further cementing the series\u2019 place in popular culture[7].\n\n## Recent Developments\n\n- **Stage Productions**: *Harry Potter and the Cursed Child*, a two-part stage play set after the events of the final book, continues to tour globally, with recent limited runs in cities like Columbus[2].\n- **Streaming and Spin-offs**: The franchise remains active with new content, including streaming availability of related films and series, and continued interest in the actors\u2019 careers beyond the original films[3].\n\n## Legacy\n\nHarry Potter has left an indelible mark on global culture, inspiring a generation of readers, influencing other media, and fostering a passionate fan community. Its exploration of universal themes, combined with Rowling\u2019s imaginative world-building, ensures its enduring relevance[5]."}, "delta": {"role": "assistant", "content": ""}}]}
Additional Context
-
There’s an inconsistency between the UI (which shows valid thumbnail images) and the API response (which sets
thumbnail_urlto the watch page). -
This breaks consumers that expect
thumbnail_urlto be an image URL for rendering. -
Reproducibility: Always (for the provided examples).