Skip to main content
GET
/
abci_query
abci_query
curl --request GET \
  --url https://rpc.cosmos.directory/cosmoshub/abci_query
import requests

url = "https://rpc.cosmos.directory/cosmoshub/abci_query"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://rpc.cosmos.directory/cosmoshub/abci_query', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://rpc.cosmos.directory/cosmoshub/abci_query",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rpc.cosmos.directory/cosmoshub/abci_query"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://rpc.cosmos.directory/cosmoshub/abci_query")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://rpc.cosmos.directory/cosmoshub/abci_query")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "error": "",
  "result": {
    "response": {
      "log": "exists",
      "height": "0",
      "proof": "010114FED0DAD959F36091AD761C922ABA3CBF1D8349990101020103011406AA2262E2F448242DF2C2607C3CDC705313EE3B0001149D16177BC71E445476174622EA559715C293740C",
      "value": "61626364",
      "key": "61626364",
      "index": "-1",
      "code": "0"
    }
  },
  "id": 0,
  "jsonrpc": "2.0"
}
{
  "id": 0,
  "jsonrpc": "2.0",
  "error": "Description of failure"
}

Query Parameters

path
string
required

Path to the data ("/a/b/c")

Example:

"\"/a/b/c\""

data
string
required

Data

Example:

"IHAVENOIDEA"

height
integer
default:0

Height (0 means latest)

Example:

1

prove
boolean
default:false

Include proofs of the transactions inclusion in the block

Example:

true

Response

Response of the submitted query

error
string
required
Example:

""

result
object
required
id
integer
required
Example:

0

jsonrpc
string
required
Example:

"2.0"