Got a cool example to share? Get listed here! Submit it now.

useChainlinkFunctions()

Collection of community submitted examples for Chainlink Functions

Get inspired from quick examples

Chainlink Functions, a new self-service platform that allows anyone to write serverless code to fetch any data from any API and run custom compute on Chainlink's network. Learn from examples created by the community or contribute your own!
Learn more about Chainlink Functions

Learn a new cat fact

Submitted by:
Junaid
This Function returns a random fact about cats from catfact.ninja
1 2 3 4 5 6 7 8 9 10 // Set the URL const config = { url: "https://catfact.ninja/fact", }; //Get the response const response = await Functions.makeHttpRequest(config); // Send the repsonse upstairs return Functions.encodeString(response.data.fact);