Skip to content

Pagination

GraphADV data endpoints support standard offset-based pagination using limit and offset query parameters.

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

Use limit to control page size (max 100) and offset to skip records.

Terminal window
# First page (records 0-24)
curl "$BASE_URL/companies?limit=25&offset=0" \
-H "X-Api-Key: $GRAPHADV_API_KEY"
# Second page (records 25-49)
curl "$BASE_URL/companies?limit=25&offset=25" \
-H "X-Api-Key: $GRAPHADV_API_KEY"
# Third page (records 50-74)
curl "$BASE_URL/companies?limit=25&offset=50" \
-H "X-Api-Key: $GRAPHADV_API_KEY"

Iterate through all pages until no more results are returned.

def fetch_all_companies(query=None, page_size=50):
"""Fetch all companies matching the query."""
all_companies = []
offset = 0
while True:
params = {"limit": page_size, "offset": offset}
if query:
params["query"] = query
response = requests.get(
f"{BASE_URL}/companies",
headers=headers,
params=params
)
page = response.json()
companies = page.get("data", [])
if not companies:
break
all_companies.extend(companies)
offset += page_size
# Optional: check total_count if available
total = page.get("total_count")
if total and offset >= total:
break
return all_companies
# Fetch all fintech companies
companies = fetch_all_companies(query="fintech")
print(f"Found {len(companies)} companies")

List enrichment jobs with pagination.

Terminal window
# Recent completed jobs
curl "$BASE_URL/jobs?status=completed&limit=20" \
-H "X-Api-Key: $GRAPHADV_API_KEY"
# Jobs since a specific date
curl "$BASE_URL/jobs?since=2026-01-01T00:00:00Z&limit=50" \
-H "X-Api-Key: $GRAPHADV_API_KEY"
  • Default limit: 25 records per page
  • Maximum limit: 100 records per page
  • Total count: Some endpoints return total_count in the response to help with pagination UI
  • Data reads are free: Pagination through read endpoints doesn’t consume units
  • Rate limits apply: Don’t paginate too aggressively; respect rate limits (100 req/min for reads)