0

I'm trying to create a YouTube search URL manually, but it isn't working.

For example, YouTube uses the following URL format to search my 'Watch history, but it doesn't work properly for me:

https://www.youtube.com/feed/history?query=search_text_here

I want to solve this problem so I can create a custom search engine in Chrome that enables me to search my YouTube 'Watch history' in one step without the need to navigate to the page first.
custom search engine settings in Chrome

Steps to generate 'Search Watch history' URL

  1. If I navigate to my 'Watch history' the URL in the address bar is:

    https://www.youtube.com/feed/history
  2. I type one or more search terms in the 'Search watch history' field, "data" in this example, and perform the search using Enter or by clicking the magnifying glass Search button (magnifying glass icon)

  3. YouTube displays the search results and the URL is now:

    https://www.youtube.com/feed/history?query=data

    Animated gif showing the same steps described in steps 1 to 3 above
     

  4. If I try to use that same URL, pasting it into another tab, it doesn't work and instead loads the 'Watch history' page without performing the search, and the URL is reset to

    https://www.youtube.com/feed/history
    

    Example of pasting URL into another tab

0

2 Answers 2

0

As of Jun 29, 2024 the URL for YouTube History Search is https://myactivity.google.com/product/youtube?q=your_query

I did not invest time in researching the official announcements on YouTube, just a basic googling. The top result for me of querying youtube search history url was View or delete your YouTube search history as the top result. Your mileage might vary.

Considering this, it seems plausible that the URL you referred to, https://www.youtube.com/feed/history, is a "legacy" URL.


Notes:

You might use the web browser developers' tools to analyze how web browser (client) and YouTube server communication works. You should look for the type and parameters of HTTP request, i.e., YouTube be using a non-standard GET request by including data on the request options or instead of a single request there might be some orchestration to handle multiple requests.

3
  • Thanks. I viewed myactivity.google.com/product/youtube?restrict=youtube then clicked on clear all button to ensure it is cleared, then clicked inside the search field, typed in a string of text that I know is in the title of a video I watched, “Sunk Cost Fallacy”, and it gave me this: “myactivity.google.com/product/youtube?q=sunk+cost+fallacy”. Doing that showed search attempts, not prior videos that I had watched. Although, that might be useful, it unfortunately is not a quick search for just the youtube watch history.
    – bgoodr
    Commented Jun 30 at 14:37
  • 1
    "You might use the web browser developers' tools to analyze how web browser...": that would be appropriate if I was after development of some client-side or server-side application, but in this case, I am after what the user can do directly using a no-code solution. Seems as of this writing, I am not going to get what I need.
    – bgoodr
    Commented Jun 30 at 14:40
  • @bgoodr try myactivity.google.com/product/… or myactivity.google.com/product/… if it's a phrase
    – Blindspots
    Commented Jul 1 at 7:45
0

The URL that YouTube generates when you search your Watch history is not a functional link.

I don't know why it is generated except perhaps it is provided as a visual cue that it performed a search for the listed keywords.

Refreshing the page following your search using F5 or by clicking Enter while in the address bar will clear the current search and revert the URL to

https://www.youtube.com/feed/history

It is necessary to use the search button to trigger a search. It can't be triggered from the URL that YouTube generates from a search.

Pending finding a way to generate YouTube Watch history searches from the address bar, if you want to search the YouTube myactivity data as Rubén suggested, you could try the following syntax to restrict it to Watched videos:

https://myactivity.google.com/product/youtube?query=search&restrict=youtube.com%2Fwatch%3F&q=%s

Your mileage will vary but it seems to support some modifiers and grouping, such as:

  • red blue // red and blue
  • red OR blue
  • red|blue // OR alternate version
  • "red blue" // Red next to blue

It is a dog (slooooooooow), especially if there are few or no results. Probably best to save a shortcut to https://www.youtube.com/feed/history and simply use YouTube's search interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.