Script by script hash
curl --request GET \
--url https://mainnet.gomaestro-api.org/v1/scripts/{script_hash} \
--header 'api-key: <api-key>'import requests
url = "https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}', 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://mainnet.gomaestro-api.org/v1/scripts/{script_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api-key: <api-key>"
],
]);
$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://mainnet.gomaestro-api.org/v1/scripts/{script_hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"hash": "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a",
"type": "native",
"bytes": "8200581c4da965a049dfd15ed1ee19fba6e2974a0b79fc416dd1796a1f97f5e1",
"json": {
"keyHash": "4da965a049dfd15ed1ee19fba6e2974a0b79fc416dd1796a1f97f5e1",
"type": "sig"
},
"first_seen": {
"tx_hash": "257916e7ae112cf16f27218e41bfa37c018bab922354201b3b38c9a24c35ab33",
"slot": 55718892,
"timestamp": "2022-03-14 19:13:03"
}
},
"last_updated": {
"timestamp": "2023-10-18 07:30:52",
"block_hash": "0e1e924710135acfe200ab13d290bd282a67584fd54456f0dcac0aeaa38bb2c2",
"block_slot": 106047961
}
}Scripts
Script by script hash
Get Cardano script details by script hash including Plutus script information and execution parameters.
GET
/
scripts
/
{script_hash}
Script by script hash
curl --request GET \
--url https://mainnet.gomaestro-api.org/v1/scripts/{script_hash} \
--header 'api-key: <api-key>'import requests
url = "https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}', 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://mainnet.gomaestro-api.org/v1/scripts/{script_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api-key: <api-key>"
],
]);
$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://mainnet.gomaestro-api.org/v1/scripts/{script_hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.gomaestro-api.org/v1/scripts/{script_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"hash": "f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a",
"type": "native",
"bytes": "8200581c4da965a049dfd15ed1ee19fba6e2974a0b79fc416dd1796a1f97f5e1",
"json": {
"keyHash": "4da965a049dfd15ed1ee19fba6e2974a0b79fc416dd1796a1f97f5e1",
"type": "sig"
},
"first_seen": {
"tx_hash": "257916e7ae112cf16f27218e41bfa37c018bab922354201b3b38c9a24c35ab33",
"slot": 55718892,
"timestamp": "2022-03-14 19:13:03"
}
},
"last_updated": {
"timestamp": "2023-10-18 07:30:52",
"block_hash": "0e1e924710135acfe200ab13d290bd282a67584fd54456f0dcac0aeaa38bb2c2",
"block_slot": 106047961
}
}Authorizations
Project API Key
Path Parameters
Hex encoded script hash
Response
Script corresponding to the provided script hash
Timestamped response. Returns the endpoint response data along with the chain-tip of the indexer, which details at which point in the chain's history the data was correct as-of.
Was this page helpful?
⌘I

