Find out how to manage and interact with the Filecoin network using the standard JSON-RPC API.

Quick start

The easiest way to test the API is to use Curl commands. A Curl command to the Filecoin network looks something like this:

curl --location --request POST '<NODE_ADDRESS>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "params": [<ARRAY OF PARAMETERS>],

Step-by-step example

  1. In a terminal window, use Curl to request the current chain head from a public Glif node.\

  • curl -X POST 'https://api.node.glif.io' \
        -H 'Content-Type: application/json' \
        --data '{"jsonrpc":"2.0","id":1,"method":"Filecoin.ChainHead","params":[]}'

    The ChainHead endpoint doesn’t require any input parameters, so we’ve left params an empty array [].

  • The above command will output a large chunk of JSON data. You can use JSON processor JQ to prettify the output:

  1. curl -X POST 'https://api.node.glif.io' \
        -H 'Content-Type: application/json' \
        --data '{"jsonrpc":"2.0","id":1,"method":"Filecoin.ChainHead","params":[]}' \
        | jq
        "jsonrpc": "2.0",
            "result": {
                "Cids": [
                    "/": "bafy2bzacecrbhy67by4upktab6rvbgd3w5jml7zog4ifoaupo35yo4rbbc4am"
                    "/": "bafy2bzacecm42csr2ysmgpj54lz762iom4n4gcafkerijirzsfzq3jni2gqyu"
                "Blocks": [
                    "Miner": "f0152747",
                    "Ticket": {


Each method has specific permissions that must be met before you can receive a response from a Filecoin node. Methods with the read permission can be called by anyone at anytime, without the need for a token. All other permissions require you to send an authentication along with you request.

  • read: Read node state, no private data.

  • write: Write to local store / chain, and read permissions.

  • sign: Use private keys stored in wallet for signing, read and write permissions.

  • admin: Manage permissions, read, write, and sign permissions.


Each node implementation has different ways to generate and manage authentication tokens. Take a look at your node’s specific documentation:

If you are using a node provider service like Glif, take a look at your providers documentation to find out how to manage authentication tokens.

Last updated