Get data from api

const axios = require(“axios”);

const options = {
method: ‘GET’,
url: ‘https://cricket-live-data.p.rapidapi.com/series’,
headers: {
‘X-RapidAPI-Key’: ‘15b1e75bcdmsh6e0d7dcc733616cp1adbd1jsnc3c800972911’,
‘X-RapidAPI-Host’: ‘cricket-live-data.p.rapidapi.com
}
};

axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});

How to get data from this api

Use the web component, set the url and request header, then use the Get method and receive the result in the GotText event
An example App Inventor Tutorials and Examples: Dropbox | Pura Vida Apps

Taifun

Read the guide shared by taifun and use this link as url from the return json response parse the contents

https://cricket-live-data.p.rapidapi.com/series/?rapidapi-key=15b1e75bcdmsh6e0d7dcc733616cp1adbd1jsnc3c800972911

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.