Skip to Content
CompanySpec
Recipes

Research companies with an AI agent

A pattern for agents that answer questions about companies cheaply and accurately.

Agents work best when they start broad and free, then go deep only on companies that matter.

  1. Understand the question. Turn "who sells scheduling software to dentists in Texas?" into filters plus a semantic_query. Use GET /values/{field} to check valid filter values.
  2. Count first. POST /companies/count is free (30 per minute). If the total is large, add filters before searching.
  3. Search with a small limit. Start with limit: 10–25 and min_score.
  4. Go deep on the shortlist. Profiles, page summaries (/companies/{company}/pages/pricing, /companies/{company}/pages/legal), technologies and job postings are free for companies already returned this billing month.
  5. Cite the source page. Page summaries include the page URL, so the agent can show where a claim came from.

Example prompt for your agent

You have the CompanySpec API. Call /companies/count before /companies/search (max 30 counts per minute).
Never request more than 25 results unless the user asks. Use page summaries to
answer questions about pricing, security or integrations, and include the page URL.

Tool definitions

To give an agent these endpoints as tools (function calling), generate the tool schemas from the OpenAPI spec. Start with resolve, count, search, get a company and get a page summary; that covers most questions.

An official MCP server is on the way. See MCP.

On this page