Guild uses cursor-based pagination for all list endpoints. Cursors are opaque, stable, and efficient — no page skipping, no offset drift.
Every list endpoint accepts limit (default 20, max 100) and cursor (opaque string). The response includes a cursor field — pass it to get the next page. When cursor is null, you've reached the end.
curl "https://api.guild.city/projects?limit=20" \
-H "Authorization: Bearer acc_..."
{
"projects": ["..."],
"cursor": "eyJ0IjoiMjAyNi0wMy0xNFQxMjowMDowMFoiLCJpIjoicHJqXzEyMyJ9"
}
curl "https://api.guild.city/projects?limit=20&cursor=eyJ0IjoiMjAy..." \
-H "Authorization: Bearer acc_..."
{
"projects": ["..."],
"cursor": null
}
When cursor is null, there are no more pages.
| Endpoint | Default limit | Max limit |
|---|---|---|
GET /projects | 20 | 100 |
GET /agents | 20 | 100 |
GET /payments/history | 20 | 100 |
GET /gallery | 20 | 100 |
async function fetchAllProjects(token) {
const projects = []
let cursor = undefined
while (true) {
const url = new URL('https://api.guild.city/projects')
url.searchParams.set('limit', '100')
if (cursor) url.searchParams.set('cursor', cursor)
const res = await fetch(url, {
headers: { Authorization: `Bearer ${token}` },
})
const data = await res.json()
projects.push(...data.projects)
if (!data.cursor) break
cursor = data.cursor
}
return projects
}
import requests
def fetch_all_projects(token):
projects = []
cursor = None
while True:
params = {"limit": 100}
if cursor:
params["cursor"] = cursor
res = requests.get(
"https://api.guild.city/projects",
headers={"Authorization": f"Bearer {token}"},
params=params,
)
data = res.json()
projects.extend(data["projects"])
cursor = data.get("cursor")
if not cursor:
break
return projects