Chainlink Functions securely connects the world's APIs to Web3 in minutes

Chainlink Functions is a Web3 serverless developer platform that allows you to fetch any data from any API and run custom compute on Chainlink's highly secure and reliable network.

// Fetch your data from one or more APIs
const weather = await Functions.makeHttpRequest({
url: `https://example.com?loc=bali&key=${secrets.key}`})

// Run any custom compute needed
const baliDegree = Math.round(weather.data["temp"] * 100)

// Write data to the blockchain using decentralized oracles
return Functions.encodeUint256(baliDegree)

Decentralized compute runtime connecting data, devices, and systems to blockchains

Extensive connectivity

Connect your smart contract to any data source, ranging from public or password-protected APIs to IoT devices and enterprise systems.

Customizable computation

Aggregate and transform your data using highly scalable and customizable serverless runtime environments.

Trust-minimized security

Build upon Chainlink's time-tested decentralized infrastructure that already helps secure billions of dollars  for Web3 apps.

Self-service in minutes

Get started in minutes with Function’s serverless developer solution featuring a CLI, starter kits, and debugging environment.

Serverless runtime

Run Javascript code in a serverless manner so you can focus less on infrastructure and more on your core application.

How Chainlink Functions works

1

An end user initiates the Chainlink Function embedded within the dApp.

2

The dApp makes a request to the Chainlink Functions smart contract. This request consists of the API endpoint, any transformations to the data and encrypted credentials (if any).

3

A decentralized oracle network (DON) continuously listens to the Chainlink Functions smart contract. When it picks up the request, each node independently triggers their runtime environment to fetch external data, performs any computations on it, and returns the result.

4

The nodes reach a consensus on the final answer using OCR 2.0. One node is then picked to transmit the result back on-chain. In the unlikely event that the node fails to publish the data, another node is chosen to transmit it on-chain. The end result is high reliability and trust-minimized security.

Start using Chainlink Functions

What developers are saying

Dopex logo
Blockschles logo
Thirdweb logo
Playground logo

“We’re excited to use Chainlink Functions to quickly and easily access high-quality derivatives data on-chain. By leveraging Chainlink’s industry-leading oracle infrastructure that already underpins the DeFi economy, we can maintain our trust-minimization standards while advancing the core functionality of our protocol.”

Witherblock

Lead Developer, Dopex

“Easy access to derivatives data on-chain is crucial for supporting new kinds of trading opportunities in DeFi. As a regulated entity, Block Scholes' independent, unbiased, institutional-grade on-chain data offering combined with Chainlink Functions help to create a reliable foundation for developers to build mature DeFi products.”

Eamonn Gashier

CEO, Block Scholes

“Given that smart contracts are deterministic, there is no easy way for developers to access public or private APIs from the Internet in a trust-minimized and reliable way. Chainlink Functions solves this problem by utilizing the same network of highly secure nodes that power Chainlink Price Feeds to enable Web3 developers to pull any API with just a few lines of code.”

Ciara Nightingale

DevRel Engineer, Thirdweb

“Dynamic NFTs require secure access to on-chain data.. Chainlink Functions makes getting data on-chain seamless by, allowing developers to connect NFTs to any API in minutes. We believe that this new tool will unlock countless new possibilities for dynamic NFTs and inspire developers to create exciting new use cases for this transformative technology.”

Ethan Bazarganfard

Co-Founder, Playground

Get started in minutes with a few lines of code

FETCH
Fetch

Fetch your data from one or more APIs

run
Run

Run any custom compute needed

return
RETURN

Send your data to the blockchain using decentralized oracles

Get the latest Chainlink content straight to your inbox.