Use HubSpot GraphQL API to query nested CRM records and associations in a single request

domain: developers.hubspot.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Send a POST request to the HubSpot GraphQL endpoint at /collector/graphql with an Authorization: Bearer header
  2. Write a query that selects a CRM object type (e.g., CRM_CONTACT) with the fields you need and includes an associations block to traverse related objects
  3. In the associations block specify the objectType of the related records and the properties to return for each associated record
  4. Use GraphQL variables for pagination cursors (after) and limit values to keep the query reusable
  5. Inspect the paging.cursor value in the response to advance to the next page of results
  6. Compare total response size against making equivalent REST calls; GraphQL is most valuable when fetching a record and its associations in one trip

Known gotchas

Related routes

Use HubSpot's GraphQL API to query CRM records with nested associations in a single request, reducing round-trips compared to the REST CRM search API
hubspot.com · 5 steps · unrated
Use the HubSpot CRM Search API with nested filter groups to perform complex multi-condition queries across objects
developers.hubspot.com · 6 steps · unrated
Use the HubSpot CRM Search API with nested filterGroups to query records matching complex multi-condition criteria and paginate results
developers.hubspot.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans