title: How to call 2 different Api in Node.js
body: <p>I need to call 2 different endpoint api and fetch data from both, currently I'm only able to call each one individually.</p>
  <p>Here is my code so far:</p>
  <pre><code>app.get('/', function(req, res) {
  
   const url = 'https://allsportsapi.com/api/football/?met=Fixtures&amp;APIkey=myapikey&amp;from=2020-07-23&amp;to=2020-07-24&amp;leagueId=262';
  
  https.get(url, function (response) {
    let body = '';
    response.on('data', function(chunk){
      body += chunk;
  
    });
    response.on('end', function(){
      const apiResponse = JSON.parse(body);
      const blob = apiResponse;
      const stan = apiResponse.result[0].event_home_team;
      const away_1 = apiResponse.result[0].event_away_team;
      const stadium = apiResponse.result[0].event_stadium;
  
      const prova = apiResponse.result[0].home_team_key;
       
  
      console.log('got a response: ');
      // console.log(blob);
  
  
      res.render('test', {team: stan, fuori:away_1, stadio: stadium});
    });
  
  
    }).on('error', function(e){
        console.log(&quot;Got an error: &quot;, e);
  
  });
  
    });
  
  
  app.listen(3000, function() {
    console.log('Server started on port 3000');
  });
  </code></pre>
  <p>I need to call another api which is: <a href="https://gnews.io/api/v3/topics/sports?&amp;token=" rel="nofollow noreferrer">https://gnews.io/api/v3/topics/sports?&amp;token=</a></p>
  <p>Thanks in advance.</p>