List draft posts
import { ParagraphAPI } from "@paragraph-com/sdk"
const api = new ParagraphAPI({ apiKey: "your-api-key" })
const { items: drafts, pagination } = await api.posts.list({ status: "draft" })curl "https://public.api.paragraph.com/api/v1/posts?status=draft" \
-H "Authorization: Bearer your-api-key"import requests
url = "https://public.api.paragraph.com/api/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.api.paragraph.com/api/v1/posts', 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://public.api.paragraph.com/api/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://public.api.paragraph.com/api/v1/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public.api.paragraph.com/api/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.paragraph.com/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"title": "<string>",
"slug": "<string>",
"imageUrl": "<string>",
"publishedAt": "<string>",
"updatedAt": "<string>",
"subtitle": "<string>",
"staticHtml": "<string>",
"json": "<string>",
"markdown": "<string>",
"coinId": "<string>",
"categories": [
"<string>"
],
"authors": [
{
"id": "<string>",
"publicationId": "<string>",
"walletAddress": "<string>",
"avatarUrl": "<string>",
"name": "<string>",
"bio": "<string>",
"farcaster": {
"username": "<string>",
"displayName": "<string>",
"fid": 123
}
}
],
"authorIds": [
"<string>"
],
"views": 123
}
],
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123
}
}{
"success": false,
"msg": "<string>"
}{
"success": false,
"msg": "<string>"
}posts
List your posts
Retrieve a paginated list of posts from your publication. The publication is identified by the API key provided in the Authorization header.
Use the status parameter to filter by post status (published, draft, scheduled, or archived). Defaults to published.
GET
/
v1
/
posts
List draft posts
import { ParagraphAPI } from "@paragraph-com/sdk"
const api = new ParagraphAPI({ apiKey: "your-api-key" })
const { items: drafts, pagination } = await api.posts.list({ status: "draft" })curl "https://public.api.paragraph.com/api/v1/posts?status=draft" \
-H "Authorization: Bearer your-api-key"import requests
url = "https://public.api.paragraph.com/api/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.api.paragraph.com/api/v1/posts', 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://public.api.paragraph.com/api/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://public.api.paragraph.com/api/v1/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public.api.paragraph.com/api/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.paragraph.com/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"title": "<string>",
"slug": "<string>",
"imageUrl": "<string>",
"publishedAt": "<string>",
"updatedAt": "<string>",
"subtitle": "<string>",
"staticHtml": "<string>",
"json": "<string>",
"markdown": "<string>",
"coinId": "<string>",
"categories": [
"<string>"
],
"authors": [
{
"id": "<string>",
"publicationId": "<string>",
"walletAddress": "<string>",
"avatarUrl": "<string>",
"name": "<string>",
"bio": "<string>",
"farcaster": {
"username": "<string>",
"displayName": "<string>",
"fid": 123
}
}
],
"authorIds": [
"<string>"
],
"views": 123
}
],
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123
}
}{
"success": false,
"msg": "<string>"
}{
"success": false,
"msg": "<string>"
}Authorizations
API key for authenticating protected endpoints. Pass as Bearer token in Authorization header.
Query Parameters
Cursor for pagination
Maximum number of items to return (1-100, default: 10)
Required range:
1 <= x <= 100Include full content fields (markdown, json, staticHtml). Default: false
Filter by post status. Default: published
Available options:
published, draft, scheduled, archived ⌘I

