Closed anmancontent closed 1 year ago
How can I filter my search to only get YouTube playlists? (like this: https://www.youtube.com/watch?v=sWcLccMuCA8&list=PLiN-7mukU_RFooOYRV24OVaorPdJNcvSS&ab_channel=AphexTwin-Topic)
Hi @steghy, I'll whip up an example for this now to show you how this works
I've created the following example to hopefully help show how this works - https://github.com/tombulled/innertube/blob/9dc65252a5863bef63683a4e61ed813960cb65b8/examples/filter-search.py
You'll need to use your Browser's Developer Tools to intercept the requests sent to the InnerTube API by YouTube (or a proxy). Once you've done that you should be able to see which params
to use based on the filters you've selected.
I believe the params
are just URL-encoded Base64-encoded protobuf data (e.g. you can decode it using https://protobuf-decoder.netlify.app/), though it'd likely take a bit of reverse engineering to figure out appropriate field names for the data
Hi @anmancontent, thanks for opening this issue - filtering searches is indeed performed using search
params
, however from memory these vary slightly between each service.To help understand your needs better, which service are you hoping to perform search requests against? (e.g. YouTube, YouTube Music, YouTube Kids, YouTube Studio etc.)