Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you filter searches using params? #47

Closed
anmancontent opened this issue May 7, 2023 · 4 comments · Fixed by #62
Closed

How do you filter searches using params? #47

anmancontent opened this issue May 7, 2023 · 4 comments · Fixed by #62
Assignees

Comments

@anmancontent
Copy link

No description provided.

@tombulled tombulled changed the title is there any filters in search ? is there any example about params in search How do you filter searches using params? May 14, 2023
@tombulled
Copy link
Owner

tombulled commented May 14, 2023

is there any filters in search ? is there any example about params in search

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.)

@g3nsy
Copy link
Contributor

g3nsy commented Oct 30, 2023

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)

@tombulled
Copy link
Owner

Hi @steghy, I'll whip up an example for this now to show you how this works

@tombulled
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants