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 offchain 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 onchain and offchain 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 offchain data
Outlined below are multiple ways developers can connect smart contracts to offchain data feeds. Click a request type to learn more about it:
Request Type | Description |
---|---|
HTTP GET Single Word Response | This 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 Responses | This 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 Response | This 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 Reponses | This 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 Request | This 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.