How to Use The Companies API company search in opencode
Returns companies matching conditions such as industry, country, and technology use. Use it to discover businesses that meet your criteria before researching individual domains.
Prompts to try with The Companies API company search in opencode
Copy an example into opencode, or ask in your own words.
Use The Companies API company search to find retail companies in France using Shopify, then create an internal table of the returned businesses in this project.
Use The Companies API company search to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from The Companies API company search and tell me what changed since last week.
Check The Companies API company search and summarize what you find in three bullet points.
Pull the newest data from The Companies API company search and give me the result as a table.
How to set up The Companies API company search in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run The Companies API company search
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "thecompaniesapi/companies/search", "input": { "query": "<query>" } }'
Then paste one of the prompts above: opencode finds The Companies API company search on Spiral, shows the price and runs it.
The Companies API company search providers and prices
Spiral runs The Companies API company search through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Page | a number from 1 | 1-based page number. Default 1. | |
| Size | 1 to 100 | 10 | Companies per page, 1 to 100. Default 10. Each company returned costs 5 credits. |
| Sort order | asc or desc | asc or desc. |
Every API field of The Companies API · Company search is on its tool page: open its card above.
What can you do with The Companies API company search in opencode?
Build an internal company research view that combines business profiles and domain email conventions. A coding agent can map The Companies API results into your project's account records and comparison tables.
Prepare internal account briefs
Find businesses matching a target market, add company profiles from domains or existing business emails, and attach domain email conventions for the account team.
Review CRM account records
Compare stored company details with returned profiles, search for ambiguous business names, and review stored domain email conventions against returned patterns.
Plan business email verification
Select target companies, establish their business context from a domain or existing business email, and rank returned email formats by usage percentage before separate verification.
Maintain an internal company directory
Discover companies within the directory's scope, populate business profiles from domains or business inboxes, and maintain a reference of email naming conventions by domain.
Compare technology adoption
Find companies using a technology and compare their industry, size, and headquarters. Add known businesses to the comparison using their domains or business emails.
Build internal territory research
Search companies by country and industry, then add profile details for known accounts to help teams assess the businesses in each territory.
More on The Companies API company search and opencode
Overview
The Companies API company search in other agents
Questions about The Companies API company search in opencode
Can opencode use The Companies API company search?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run The Companies API company search like any built-in tool.
How much does The Companies API company search cost in opencode?
Up to $0.34918 per run. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an Alexandria account to use The Companies API company search in opencode?
No. Spiral runs The Companies API company search on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up The Companies API company search in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while The Companies API company search runs?
The Companies API company search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
Where does The Companies API get its company information?
It uses company websites, social networks, search engines, and other public sources to refresh company data.
How broad is the company database?
The Companies API advertises more than 50 million companies across industries and regions. That database figure does not establish email-pattern availability for every domain.
How does the database change over time?
The Companies API says it continuously adds companies and removes businesses that no longer exist.
Is the underlying information public?
The Companies API states that its data is public and visible on the internet.
Does The Companies API guarantee complete and accurate data?
No. Section 6.2 of its Terms of Use disclaims warranties that the data remains accurate, complete, or up to date.
Start using The Companies API company search in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


