Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

326
Visualizações
How to return data from youtube API v3 for two youtube channels with one request?

I am currently writing an endpoint to return data for videos from two youtube channels. Currently using the method of making the request via url and fetch() and want to continue using this. How do I construct the URL such that it returns the data for two channels and not one. My current URL is shown below:

lets say channel1 = foo and I want to query for channel2 = bar also, without using a second url and making a second query.

let url = `https://www.googleapis.com/youtube/v3/search?key=${process.env.YOUTUBE_API_KEY}&part=snippet&q=foo`;

Any help would be greatly appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your example call uses "q=foo" where you say foo is channel1. However "q" is for the query term so the API would search all channels for "foo".

To limit a search to a channel you would use the "channelId" parameter, and you an only use one per call.

See https://developers.google.com/youtube/v3/docs/search/list

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda