NEW

CCIP is now available on testnet for all developers. Get started today.

Chainlink Any API Documentation

Connecting to any API with Chainlink enables your contracts to access to any external data source through our decentralized oracle network. We understand making smart contracts compatible with off-chain data adds to the complexity of building smart contracts. We created a framework with minimal requirements, yet unbounded flexibility, so developers can focus more on the functionality of smart contracts rather than what feeds them. Chainlink’s decentralized oracle network provides smart contracts with the ability to push and pull data, facilitating the interoperability between on-chain and off-chain applications.

Whether your contract requires sports results, the latest weather, or any other publicly available data, the Chainlink contract library provides the tools required for your contract to consume it.

Requesting off-chain data

Outlined below are multiple ways developers can connect smart contracts to off-chain data feeds. Click a request type to learn more about it:

Request TypeDescription
HTTP GET Single Word ResponseThis guide explains how to make an HTTP GET request and parse the json response to retrieve the value of one single attribute.
HTTP GET Multi-Variable ResponsesThis guide explains how to make an HTTP GET request and parse the json response to retrieve the values of multiple attributes.
HTTP GET Element in Array ResponseThis guide explains how to make an HTTP GET request that returns a json array and parse it to retrieve the target element's value.
HTTP GET Large ReponsesThis guide explains how to make an HTTP Get request that returns a json containing an arbitrary-length raw byte data and parse it to return the data as bytes data type.
Existing Job RequestThis guide explains how to call a job that leverages External adapters and returns the relevant data to the smart contract. This allows building succinct smart contracts that do not need to comprehend the URL or the response format of the target API.

Building external adapters

To learn more about building external adapters and adding them to nodes, refer to the External Adapters documentation.

To understand different use cases for using any API, refer to Other Tutorials.

What's next

Stay updated on the latest Chainlink news