Search Companies
affinity_search_companiesSearch companies by name or domain with partial matching. Find specific organizations or list all using pagination.
Instructions
Search for companies (organizations) in Affinity by name or domain.
This is a V1 API endpoint - search is NOT available in V2.
Use this tool to:
Find a company by its domain (e.g., "acme.com")
Search for companies by name
List all companies (omit term parameter)
Search Behavior:
Domain search: Exact and partial matching (e.g., "acme" matches "acme.com")
Name search: Partial matching on organization name
Empty term: Returns all organizations (paginated)
Global vs Custom Organizations:
global=true: Shared record from Affinity's database (cannot modify/delete)
global=false: Custom organization you created (can modify/delete)
Parameters:
term: Company name or domain to search
withInteractionDates: Include first/last email and event timestamps
pageSize: Results per page (max 500)
pageToken: Pagination token for next page
Returns (JSON): { "organizations": [ { "id": number, // Use with V2 affinity_get_company "name": string, "domain": string | null, "domains": string[], "global": boolean, // true=shared, false=custom "interaction_dates": {} // if requested } ], "next_page_token": string | null, "count": number, "hasMore": boolean }
Example use cases:
Look up company by domain: term="acme.com"
Search by name: term="Acme Corporation"
Find companies at a TLD: term=".io"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | Search term: company name or domain. Omit to list all companies. | |
| withInteractionDates | No | Include first/last email and event timestamps | |
| withInteractionPersons | No | Include person IDs from interactions | |
| withOpportunities | No | Include opportunity IDs | |
| pageSize | No | Items per page (default 100, max 500) | |
| pageToken | No | Pagination token from previous response (next_page_token) | |
| responseFormat | No | Output format: "json" or "markdown". Default: "json" |