Can I make API calls to an External API and return results

I want to call an external API and return list of an image/video generated

Hi Ayush,

Yes you can calls to an external API in Five, Here is a sample code that demonstrates how to get a response from an API by Google

const url = `https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants%20in%20${POST_CODE}%20QLD&key=${API_KEY}`;
    const client = five.httpClient();
    let httpResult = client.get(url);

In the code above, we construct the API URL, then we create an HTTP client using five.httpClient() and use it to make a GET request to the specified URL. The results from the API are stored in the httpResult variable.

you can also refer to our documentation over here Introduction | Five | Low-Code For Real Developers and field | Five | Low-Code For Real Developers