Youtube API search auto-complete

2020-02-02 10:16发布

问题:

I'm using Youtube API, I'd like to have a search auto-complete feature, just like on YouTube, when you type into the search input box, it gives you search suggestions. I've read the docs, but still missing, Is this possible using the API?

回答1:

Ok I found this URL:

http://suggestqueries.google.com/complete/search?client=firefox&ds=yt&q=Query

It isn't part of Youtube API, but still works, returns a JSON response.



回答2:

For json just add "client" parameter:

http://suggestqueries.google.com/complete/search?client=youtube&ds=yt&client=firefox&q=Query



回答3:

Check Out YouTube AutoComplete Keyword Scraper . Not really sure of the context the person asking the question wants YouTube auto complete solution for but I thought I would throw this out there.