Setup
Set your API key before running any example:First request: search accounts
The simplest integration check — authenticate and list accounts in your workspace.{} to return all accounts (paginated).
Add a company and wait for enrichment
Adding a company is async. You receive apublic_operation_id and poll until enrichment completes.
Step 1: Submit the company
company_name, domain, or id (existing PG:AI company UUID).
Step 2: Poll operation status
status is completed or failed. Typical intervals: 2–5 seconds.
Step 3: Read the enriched profile
Once complete, the operation result includes the company id (or use the id you already had):Full Python example
Research an account
Combine account search, semantic search, and profile data for a research pipeline.Step 1: Find the company
Step 2: Unified search across your workspace
Step 3: Company profile and relevance
GET /filters to discover filter metadata available for your workspace before building search UIs.
Find and enrich contacts
Step 1: Search contacts
Step 2: Enrich email or phone
GET /operations/{public_operation_id} if needed.
List canvases for a company
Use the workspace canvas list with acompany_ids filter. This is the canonical pattern — prefer it over company-scoped list paths.
contact_id, content_type, created_after, created_before.
Fetch a single document with GET /canvas/{canvas_id}.
List territories
Check credit usage
MCP instead of REST
For AI clients (Claude, Cursor, etc.), the MCP server exposes the same workspace data as tools — no need to wire every REST call yourself. See the Integrations tab for MCP setup, or connect tohttps://mcp.getpg.ai.
Error handling
All flows should handle standard HTTP status codes in production:
See Authentication for permission scopes and rate limit headers.
