Skip to content

Pagination

The proxy limits requests to 50 rows per call (default is 25). Use ordering plus filters to paginate through a dataset and the total_count field to know how many records match your filters.

Terminal window
export BASE_URL="https://api.graphadv.com"
export GRAPHADV_API_KEY="YOUR_API_KEY"

All examples use a single header: x-api-key.

Terminal window
curl -X POST "$BASE_URL/firms" \
-H "x-api-key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"select": ["legal_name","sec_number","aum_total_usd"],
"filters": { "region": "eq.West" },
"order": "aum_total_usd.desc",
"limit": 25
}'

Offset is not exposed in the proxy. Instead, order by a stable field and filter based on the last value you received.

Terminal window
PAGE_SIZE=20
LAST_AUM=""
curl_page() {
local filter_part=""
if [ -n "$LAST_AUM" ]; then
filter_part=", \"aum_total_usd\": \"lt.${LAST_AUM}\""
fi
curl -s -X POST "$BASE_URL/firms" \
-H "x-api-key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"select\": [\"legal_name\",\"sec_number\",\"aum_total_usd\"],
\"filters\": { \"region\": \"eq.West\"${filter_part} },
\"order\": \"aum_total_usd.desc\",
\"limit\": ${PAGE_SIZE}
}"
}
page=$(curl_page)
LAST_AUM=$(echo "$page" | jq -r '.data[-1].aum_total_usd // empty')
  • Keep limit at or below 50; the proxy enforces the cap.
  • Use total_count from the response to size your pagination UI.
  • For large datasets, paginate by a stable sort column and filter on the last value (as shown above) instead of relying on offsets.