# Cardano Node API's document

**URL:** <https://forum.cardano.org/t/cardano-node-apis-document/58196>\
**Category:** Misc Dev Talk\
**Tags:** cardano\
**Created:** [20 April 2021 09:54 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196 "2021-04-20T09:54:59Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwykr](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rwykr](https://forum.cardano.org/u/rwykr)\
**Post date:** [20 April 2021 09:54 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/1 "2021-04-20T09:54:59Z")

</div>

Hello,

Is there any node API document available for Cardano? Can anyone share the link?

I want block and transaction information from API.

---

<div class="post-metadata">

**Author:** ![Anslume](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/anslume/32/32594_2.png) [@Anslume](https://forum.cardano.org/u/Anslume)\
**Post date:** [20 April 2021 12:41 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/2 "2021-04-20T12:41:50Z")

</div>

Is this what you are looking for ?

[https://docs.cardano.org/projects/cardano-node/en/latest/reference/cardano-node-cli-reference.html](https://docs.cardano.org/projects/cardano-node/en/latest/reference/cardano-node-cli-reference.html)

---

<div class="post-metadata">

**Author:** ![rwykr](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rwykr](https://forum.cardano.org/u/rwykr)\
**Post date:** [20 April 2021 17:36 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/3 "2021-04-20T17:36:02Z")

</div>

No. This refers CLI.

I want APIs which we can run on our own node or on any public node. Those APIs I’ve to integrate with my application.  
I want block information like block DateTime, block height, block hash, etc and transactions under that block which may include transaction hash, sender, recipient, balance, etc.

---

<div class="post-metadata">

**Author:** ![bwbush](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/bwbush/32/29827_2.png) [@bwbush](https://forum.cardano.org/u/bwbush)\
**Post date:** [20 April 2021 17:45 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/4 "2021-04-20T17:45:22Z")

</div>

Cardano-node does not have a REST API, but it does have a [Haskell API for inter-process communication](https://input-output-hk.github.io/cardano-node/cardano-api/index.html) that is accessible through a local unix socket. You can access that socket from a remote machine using an SSH tunnel or a tool like `socat`, and it appears that [dandelion.link](https://dandelion.link/endpoints) offers a service to connect to their public node.

---

<div class="post-metadata">

**Author:** ![rdlrt](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rdlrt/32/9098_2.png) [@rdlrt](https://forum.cardano.org/u/rdlrt)\
**Post date:** [20 April 2021 23:23 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/5 "2021-04-20T23:23:03Z")

</div>

You would want to use [cardano-db-sync](https://github.com/input-output-hk/cardano-db-sync) for your own node. This will help you sync your node to a Postgres database, which in turn can be queried using API layer of your choice ([cardano-graphql](https://github.com/input-output-hk/cardano-graphql), [cardano-rest](https://github.com/input-output-hk/cardano-rest) or [PostgREST](https://rdlrt.ga/cnode/#/Build/pgrest) ). For connecting to public APIs, you can use [https://blockfrost.io](https://blockfrost.io) or [https://dandelion.link](https://dandelion.link) .

---

<div class="post-metadata">

**Author:** ![rwykr](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rwykr](https://forum.cardano.org/u/rwykr)\
**Post date:** [21 April 2021 09:02 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/6 "2021-04-21T09:02:23Z")

</div>

Thank You!

As per my understanding [cardano-db-sync](https://github.com/input-output-hk/cardano-db-sync) will run on top of our local node only and graphql, cardano-rest, PostgREST are on top of cardano-db-sync.

So, without using cardano-db-sync, are there any API’s available which will communicate with node directly.  
For e.g., cardano node is running locally and port 1234 is required to be opened then we will get the block information using below GET request [http://localhost:1234/block?1](http://localhost:1234/block?1).

---

<div class="post-metadata">

**Author:** ![rdlrt](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rdlrt/32/9098_2.png) [@rdlrt](https://forum.cardano.org/u/rdlrt)\
**Post date:** [21 April 2021 23:30 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/7 "2021-04-21T23:30:49Z")

</div>

The API interfacing - unless you want to explore Protocol (IPC API) is not available from node, certainly not in the manner you’re looking for - as mentioned above.

---

<div class="post-metadata">

**Author:** ![rwykr](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rwykr](https://forum.cardano.org/u/rwykr)\
**Post date:** [22 April 2021 04:53 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/8 "2021-04-22T04:53:14Z")

</div>

Fine! Thanks for the information.

---

<div class="post-metadata">

**Author:** ![Nye\_Liu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/nye_liu/32/31711_2.png) [@Nye\_Liu](https://forum.cardano.org/u/Nye_Liu)\
**Post date:** [22 April 2021 20:36 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/9 "2021-04-22T20:36:52Z")

</div>

I’m also looking for this information, but I cannot find a non-Haskell way of talking to a Haskell IPC endpoint.

---

<div class="post-metadata">

**Author:** ![Bruce\_Lee\_Harrison](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/bruce_lee_harrison/32/30558_2.png) [@Bruce\_Lee\_Harrison](https://forum.cardano.org/u/Bruce_Lee_Harrison)\
**Post date:** [23 April 2021 00:26 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/10 "2021-04-23T00:26:34Z")

</div>

I had the same issue. I couldn’t get anywhere with the IPC. I couldn’t find any technical documents on it or the payloads, other than reading the source code for candano-node. I decided an easier approach is writing an ouroboros client in the language I want. I don’t know what the IPC would offer that an independent network client couldn’t do, other than deeply interacting with a specific node.

---

<div class="post-metadata">

**Author:** ![Nye\_Liu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/nye_liu/32/31711_2.png) [@Nye\_Liu](https://forum.cardano.org/u/Nye_Liu)\
**Post date:** [23 April 2021 02:10 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/11 "2021-04-23T02:10:53Z")

</div>

I honestly do not understand the design philosophy here; there doesn’t seem to be any awareness of the Ops challenges to running a large number of validators (in this case, “producers”), and iohk is depending on the community to cobble together a bunch of very contorted hacks and workarounds for some questionable architecture decisions. Not much of that community effort seems to be going upstream at all.

---

<div class="post-metadata">

**Author:** ![Bruce\_Lee\_Harrison](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/bruce_lee_harrison/32/30558_2.png) [@Bruce\_Lee\_Harrison](https://forum.cardano.org/u/Bruce_Lee_Harrison)\
**Post date:** [23 April 2021 02:33 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/12 "2021-04-23T02:33:02Z")

</div>

I agree. The fact that most nodes are kept online by a pack of community developed shell scripts certainly raises my eyebrow. Actually running a node definitely involves some black magic and tribal knowledge. Thankfully these forums seems to be pretty generous in sharing that knowledge.

However, I do like the philosophy of the project which is why I’m sticking around and investing time and money into developing things.

---

<div class="post-metadata">

**Author:** ![COSDpool](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/cosdpool/32/21482_2.png) [@COSDpool](https://forum.cardano.org/u/COSDpool)\
**Post date:** [23 April 2021 13:37 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/13 "2021-04-23T13:37:51Z")

</div>

> [@Bruce\_Lee\_Harrison](#):
>
> I agree. The fact that most nodes are kept online by a pack of community developed shell scripts certainly raises my eyebrow. Actually running a node definitely involves some black magic and tribal knowledge.

A related thing I find astonishing is that there’s been no public announcement or documentation of IOG’s own devops tools for the node:

> **[GitHub - input-output-hk/cardano-ops: NixOps deployment configuration for...](https://github.com/input-output-hk/cardano-ops)**
>
> NixOps deployment configuration for IOHK/Cardano devops - GitHub - input-output-hk/cardano-ops: NixOps deployment configuration for IOHK/Cardano devops

I only found this because the [node 1.26.1 release notes](https://github.com/input-output-hk/cardano-node/releases/tag/1.26.1) referred to these in “Steps to mitigate downtime.” Following that link suggests a nix script to backup a running node… something that would be universally useful for SPOs… without even a bit of context how to use that script or create a production environment in which those tools are available.

---

<div class="post-metadata">

**Author:** ![Bruce\_Lee\_Harrison](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/bruce_lee_harrison/32/30558_2.png) [@Bruce\_Lee\_Harrison](https://forum.cardano.org/u/Bruce_Lee_Harrison)\
**Post date:** [23 April 2021 14:24 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/14 "2021-04-23T14:24:01Z")

</div>

@COSDpool wow, there is a ton of stuff in that repo. That’s a good find. There’s also stuff in there pertaining to auto-rotation of KES keys. I don’t know why this stuff isn’t being broadcast to the larger community.

---

<div class="post-metadata">

**Author:** ![Nye\_Liu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/nye_liu/32/31711_2.png) [@Nye\_Liu](https://forum.cardano.org/u/Nye_Liu)\
**Post date:** [25 April 2021 21:20 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/15 "2021-04-25T21:20:58Z")

</div>

They should take a lesson from other protocols and provide an atomic snapshot mechanism that does not require stopping the node.

All this excess tooling that is not baked _into the protocol or node itself_ just makes everyone re-invent the wheel, badly, everywhere a bit different and broken in different ways.

---

<div class="post-metadata">

**Author:** ![Nye\_Liu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/nye_liu/32/31711_2.png) [@Nye\_Liu](https://forum.cardano.org/u/Nye_Liu)\
**Post date:** [3 May 2021 18:29 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/16 "2021-05-03T18:29:39Z")

</div>

Nobody sane is going to build their own tooling off of nix.

No, cardano-node itself needs at least a few things baked into it, and not dependent on all this external tooling/hackwork

1. reload topology w/o a restart
2. rotate/reload KES keys w/o a restart
3. a canonical JSONRPC endpoint (even if it is a JSONRPC/socket bridge) that the 700 line `env` file in the guild ops tooling can use query to get all the config info at once so it isn’t 700 lines long
4. take an atomic snapshot w/o stop/start

---

<div class="post-metadata">

**Author:** ![Nye\_Liu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/nye_liu/32/31711_2.png) [@Nye\_Liu](https://forum.cardano.org/u/Nye_Liu)\
**Post date:** [3 May 2021 18:32 UTC](https://forum.cardano.org/t/cardano-node-apis-document/58196/17 "2021-05-03T18:32:58Z")

</div>

`cardano-db-sync` is not appropriate for either relays or producers.
