/snapshot/proposals/search
curl --request POST \
--url https://api.anysite.io/api/snapshot/proposals/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"count": 2,
"timeout": 300,
"query": "<string>",
"space": [
"<string>"
],
"state": "all",
"author": [
"<string>"
],
"network": "<string>",
"flagged": true,
"created_after": 123,
"created_before": 123,
"start_after": 123,
"start_before": 123,
"end_after": 123,
"end_before": 123,
"order": "created",
"ascending": false
}
'import requests
url = "https://api.anysite.io/api/snapshot/proposals/search"
payload = {
"count": 2,
"timeout": 300,
"query": "<string>",
"space": ["<string>"],
"state": "all",
"author": ["<string>"],
"network": "<string>",
"flagged": True,
"created_after": 123,
"created_before": 123,
"start_after": 123,
"start_before": 123,
"end_after": 123,
"end_before": 123,
"order": "created",
"ascending": False
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
count: 2,
timeout: 300,
query: '<string>',
space: ['<string>'],
state: 'all',
author: ['<string>'],
network: '<string>',
flagged: true,
created_after: 123,
created_before: 123,
start_after: 123,
start_before: 123,
end_after: 123,
end_before: 123,
order: 'created',
ascending: false
})
};
fetch('https://api.anysite.io/api/snapshot/proposals/search', 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.anysite.io/api/snapshot/proposals/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 2,
'timeout' => 300,
'query' => '<string>',
'space' => [
'<string>'
],
'state' => 'all',
'author' => [
'<string>'
],
'network' => '<string>',
'flagged' => true,
'created_after' => 123,
'created_before' => 123,
'start_after' => 123,
'start_before' => 123,
'end_after' => 123,
'end_before' => 123,
'order' => 'created',
'ascending' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/snapshot/proposals/search"
payload := strings.NewReader("{\n \"count\": 2,\n \"timeout\": 300,\n \"query\": \"<string>\",\n \"space\": [\n \"<string>\"\n ],\n \"state\": \"all\",\n \"author\": [\n \"<string>\"\n ],\n \"network\": \"<string>\",\n \"flagged\": true,\n \"created_after\": 123,\n \"created_before\": 123,\n \"start_after\": 123,\n \"start_before\": 123,\n \"end_after\": 123,\n \"end_before\": 123,\n \"order\": \"created\",\n \"ascending\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/snapshot/proposals/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 2,\n \"timeout\": 300,\n \"query\": \"<string>\",\n \"space\": [\n \"<string>\"\n ],\n \"state\": \"all\",\n \"author\": [\n \"<string>\"\n ],\n \"network\": \"<string>\",\n \"flagged\": true,\n \"created_after\": 123,\n \"created_before\": 123,\n \"start_after\": 123,\n \"start_before\": 123,\n \"end_after\": 123,\n \"end_before\": 123,\n \"order\": \"created\",\n \"ascending\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/snapshot/proposals/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 2,\n \"timeout\": 300,\n \"query\": \"<string>\",\n \"space\": [\n \"<string>\"\n ],\n \"state\": \"all\",\n \"author\": [\n \"<string>\"\n ],\n \"network\": \"<string>\",\n \"flagged\": true,\n \"created_after\": 123,\n \"created_before\": 123,\n \"start_after\": 123,\n \"start_before\": 123,\n \"end_after\": 123,\n \"end_before\": 123,\n \"order\": \"created\",\n \"ascending\": false\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "SnapshotProposal",
"ipfs": "<string>",
"author": "<string>",
"space": {
"id": "<string>",
"@type": "SnapshotSpaceRef",
"name": "<string>",
"image": "<string>",
"network": "<string>"
},
"text": "<string>",
"discussion_url": "<string>",
"web_url": "<string>",
"app": "<string>",
"type": "<string>",
"state": "<string>",
"privacy": "<string>",
"network": "<string>",
"symbol": "<string>",
"choices": [],
"quorum": 123,
"quorum_type": "<string>",
"snapshot_block": "<string>",
"scores": [],
"scores_by_strategy": [],
"scores_total": 123,
"scores_total_value": 123,
"vp_value_by_strategy": [],
"scores_state": "<string>",
"scores_updated_at": 123,
"vote_count": 123,
"is_flagged": true,
"strategies": [],
"validation": {
"name": "<string>",
"@type": "SnapshotSpaceValidation",
"params": {}
},
"plugins": {},
"created_at": 123,
"updated_at": 123,
"start_at": 123,
"end_at": 123
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/snapshot
/snapshot/proposals/search
Search and list Snapshot governance proposals by keyword, space, author, state, type and date ranges
Price: 5 credits per 20 results
POST
/
api
/
snapshot
/
proposals
/
search
/snapshot/proposals/search
curl --request POST \
--url https://api.anysite.io/api/snapshot/proposals/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"count": 2,
"timeout": 300,
"query": "<string>",
"space": [
"<string>"
],
"state": "all",
"author": [
"<string>"
],
"network": "<string>",
"flagged": true,
"created_after": 123,
"created_before": 123,
"start_after": 123,
"start_before": 123,
"end_after": 123,
"end_before": 123,
"order": "created",
"ascending": false
}
'import requests
url = "https://api.anysite.io/api/snapshot/proposals/search"
payload = {
"count": 2,
"timeout": 300,
"query": "<string>",
"space": ["<string>"],
"state": "all",
"author": ["<string>"],
"network": "<string>",
"flagged": True,
"created_after": 123,
"created_before": 123,
"start_after": 123,
"start_before": 123,
"end_after": 123,
"end_before": 123,
"order": "created",
"ascending": False
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
count: 2,
timeout: 300,
query: '<string>',
space: ['<string>'],
state: 'all',
author: ['<string>'],
network: '<string>',
flagged: true,
created_after: 123,
created_before: 123,
start_after: 123,
start_before: 123,
end_after: 123,
end_before: 123,
order: 'created',
ascending: false
})
};
fetch('https://api.anysite.io/api/snapshot/proposals/search', 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.anysite.io/api/snapshot/proposals/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 2,
'timeout' => 300,
'query' => '<string>',
'space' => [
'<string>'
],
'state' => 'all',
'author' => [
'<string>'
],
'network' => '<string>',
'flagged' => true,
'created_after' => 123,
'created_before' => 123,
'start_after' => 123,
'start_before' => 123,
'end_after' => 123,
'end_before' => 123,
'order' => 'created',
'ascending' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/snapshot/proposals/search"
payload := strings.NewReader("{\n \"count\": 2,\n \"timeout\": 300,\n \"query\": \"<string>\",\n \"space\": [\n \"<string>\"\n ],\n \"state\": \"all\",\n \"author\": [\n \"<string>\"\n ],\n \"network\": \"<string>\",\n \"flagged\": true,\n \"created_after\": 123,\n \"created_before\": 123,\n \"start_after\": 123,\n \"start_before\": 123,\n \"end_after\": 123,\n \"end_before\": 123,\n \"order\": \"created\",\n \"ascending\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/snapshot/proposals/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 2,\n \"timeout\": 300,\n \"query\": \"<string>\",\n \"space\": [\n \"<string>\"\n ],\n \"state\": \"all\",\n \"author\": [\n \"<string>\"\n ],\n \"network\": \"<string>\",\n \"flagged\": true,\n \"created_after\": 123,\n \"created_before\": 123,\n \"start_after\": 123,\n \"start_before\": 123,\n \"end_after\": 123,\n \"end_before\": 123,\n \"order\": \"created\",\n \"ascending\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/snapshot/proposals/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 2,\n \"timeout\": 300,\n \"query\": \"<string>\",\n \"space\": [\n \"<string>\"\n ],\n \"state\": \"all\",\n \"author\": [\n \"<string>\"\n ],\n \"network\": \"<string>\",\n \"flagged\": true,\n \"created_after\": 123,\n \"created_before\": 123,\n \"start_after\": 123,\n \"start_before\": 123,\n \"end_after\": 123,\n \"end_before\": 123,\n \"order\": \"created\",\n \"ascending\": false\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "SnapshotProposal",
"ipfs": "<string>",
"author": "<string>",
"space": {
"id": "<string>",
"@type": "SnapshotSpaceRef",
"name": "<string>",
"image": "<string>",
"network": "<string>"
},
"text": "<string>",
"discussion_url": "<string>",
"web_url": "<string>",
"app": "<string>",
"type": "<string>",
"state": "<string>",
"privacy": "<string>",
"network": "<string>",
"symbol": "<string>",
"choices": [],
"quorum": 123,
"quorum_type": "<string>",
"snapshot_block": "<string>",
"scores": [],
"scores_by_strategy": [],
"scores_total": 123,
"scores_total_value": 123,
"vp_value_by_strategy": [],
"scores_state": "<string>",
"scores_updated_at": 123,
"vote_count": 123,
"is_flagged": true,
"strategies": [],
"validation": {
"name": "<string>",
"@type": "SnapshotSpaceValidation",
"params": {}
},
"plugins": {},
"created_at": 123,
"updated_at": 123,
"start_at": 123,
"end_at": 123
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Required range:
x >= 1Required range:
20 <= x <= 1500Minimum string length:
1Available options:
active, pending, closed, all Available options:
single-choice, approval, quadratic, ranked-choice, weighted, basic Available options:
pending, final, invalid Available options:
created, start, end, votes, scores_total Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I