Skip to main content
GET
/
v1
/
materialized-views
/
{name}
This fetches a materialized view given a name
curl --request GET \
  --url https://api.dune.com/api/v1/materialized-views/{name} \
  --header 'X-Dune-Api-Key: <x-dune-api-key>'
import requests

url = "https://api.dune.com/api/v1/materialized-views/{name}"

headers = {"X-Dune-Api-Key": "<x-dune-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-Dune-Api-Key': '<x-dune-api-key>'}};

fetch('https://api.dune.com/api/v1/materialized-views/{name}', 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://api.dune.com/api/v1/materialized-views/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Dune-Api-Key: <x-dune-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://api.dune.com/api/v1/materialized-views/{name}"

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

req.Header.Add("X-Dune-Api-Key", "<x-dune-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://api.dune.com/api/v1/materialized-views/{name}")
.header("X-Dune-Api-Key", "<x-dune-api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dune.com/api/v1/materialized-views/{name}")

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

request = Net::HTTP::Get.new(url)
request["X-Dune-Api-Key"] = '<x-dune-api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "is_private": true,
  "last_execution_ids": [
    "<string>"
  ],
  "owner_team_id": 123,
  "owner_user_id": 123,
  "query_id": 123,
  "schedule": {
    "cron_expression": "0 */6 * * *",
    "expires_at": "2026-09-11T23:59:59Z",
    "next_execution_time": "2026-06-12T00:00:00Z",
    "performance": "medium"
  },
  "sql_id": "<string>",
  "table_size_bytes": 123
}
{
"error": "Bad Request"
}
{
"error": "Invalid API Key"
}
{
"error": "Not allowed to execute query. Query is archived, unsaved or not enough permissions"
}
{
"error": "Object not found"
}
{
"error": "Internal error"
}
Minimum required API key scope: Read
  • The name must be the full name qualifier for the materialized view, i.e. dune.<your_team>.<name>

Headers

X-Dune-Api-Key
string
required

API Key for the service

Path Parameters

name
string
required

Matview Name

Query Parameters

api_key
string

API Key, alternative to using the HTTP header X-Dune-Api-Key

Response

OK

id
string
is_private
boolean
last_execution_ids
string[]
owner_team_id
integer
owner_user_id
integer
query_id
integer
schedule
object
sql_id
string
table_size_bytes
integer