Build a target account list on LinkedIn by keyword, location and size
Search LinkedIn companies by keyword, location and size and get name, industry, size and URL as JSON, to build a target account list for outbound or ABM.
Account-based sales starts with a list of companies that look like your best customers, and most teams build it by typing searches into LinkedIn and copying names into a sheet. Lovely Router runs the search for you. Send a keyword with a location and size, get one JSON object per company, pay per company from a prepaid balance. Run it from a script or an AI agent and the list builds itself.
Hand it to your AI agent
Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.
Build a target account list on LinkedIn by keyword, location and size. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/find.md and https://lovelyrouter.com/docs/tools/run.md
- Plan first: POST https://lovelyrouter.com/v1/tools/suggest with `{"task": "<my task in plain words>"}` (free). It returns the tools to run in order, each with an example `input`, the `input_required` fields, an estimated cost and a ready-made `run` request. Replace the example values with my task's; if a field is unclear, read the tool with GET https://lovelyrouter.com/v1/tools/<id>. To browse instead, POST https://lovelyrouter.com/v1/tools/discover searches the catalog.
- Show me the plan and its estimated cost (`total_est_cost_usd`) before running anything large.
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up.
- If you support MCP, connect https://lovelyrouter.com/mcp instead (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <the inputs (links, keywords or accounts) and how many results you need>How it works
Define the profile
Write the keyword that describes the market, the locations you sell in and the size bands that fit.
Run the tool with a cap
Send them to
POST /v1/tools/linkedin-company-search/run.maxItemscaps the companies andmax_resultscaps the run.Qualify and enrich
Drop obvious misfits, then run the survivors through an enrichment tool and load them into your CRM or outreach tool.
Find matching companies with one request
Search LinkedIn companies takes a searchQuery and optional locations and companySize filters. maxItems caps the companies, and one run returns up to 500. The query supports LinkedIn's search operators:
curl https://lovelyrouter.com/v1/tools/linkedin-company-search/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"searchQuery": "web scraping",
"locations": [
"Germany"
],
"maxItems": 50
},
"max_results": 50
}'Write locations as full names (United Kingdom, not UK), because LinkedIn can match a short text to the wrong place. A run still going after 60 seconds returns 202; Run a tool shows how to poll.
What each company holds
| Field group | What you get |
|---|---|
| Identity | Company name |
| Classification | Industry |
| Size | Company size |
| Link | LinkedIn company URL |
This is the short form of a company. For description, headquarters, website and followers, pass the URLs to linkedin-company.
Recipes
Search a keyword that names the segment, filter by the size band that fits your product, and cap at 200. That is a starting list in one call.
Keep the keyword, change locations, and compare how many companies each region has before you hire a rep there.
Run the same query once per size band and send each band to a different sales motion.
Use words from your best customers' descriptions as searchQuery and ask a model to rank the results by similarity.
Pass the URLs to the employee tool next to pick people at each company.
Prefer plain words? Connect the MCP server and tell Claude Code or Cursor: "Search LinkedIn companies for web scraping in Germany with the linkedin-company-search tool, maxItems 100, and give me a table of name, industry, size and URL. Set max_results to 100."
Pair it with enrichment and people tools
The search gives names and URLs. The next steps turn them into a plan:
Search LinkedIn companies by keyword, location and size: name, industry, size, URL.
LinkedIn company pages: description, industry, size, headquarters, website, followers.
Employees of LinkedIn companies, filterable by job title, location and keyword: name, headline, position, profile URL.
Search LinkedIn people by keyword, location, company and title. One call returns up to 25 short profiles.
linkedin-companyenriches each URL with description, headquarters, website and followers.linkedin-company-employeeslists the people at each account.linkedin-people-searchsearches for people directly when the title matters more than the company.
For the whole prospecting workflow, see lead generation.
What you pay
You pay per company: starting a run holds its maximum cost, the per-call fee plus the per-company fee times max_results, and the run settles to what it returned. The rest of the hold goes back to your balance. A run that fails or times out pays only for the companies it delivered, and a run refused at the start costs nothing.
Building a list of 300 companies is billed as 300 companies. There is no subscription and no monthly minimum: top up from $5, and one balance pays for tools and models. The card above shows today's price; pricing lists every tool.
Frequently asked questions
Can I filter by company size?+
Yes, use companySize to pass the size ranges you want.
Can I filter by location?+
Yes, locations takes a list. Use full names, such as United Kingdom, because short forms can match the wrong place.
How many companies can one run return?+
Up to 500 per run.
Does it give me employees or emails?+
No. It lists companies. Use linkedin-company-employees for people.
Do I need a subscription?+
No. You add credit to a prepaid balance and each run draws it down. Failed runs pay only for the results they delivered, and nothing renews automatically.
Turning accounts into outreach? See lead generation, and the rest of the tool catalog. Run settings are in Run a tool.