A spreadsheet of company names is not yet a sales list.
Before writing an outreach message, you need to answer four questions:
- Is this company actually a fit for our offer?
- What public evidence supports that conclusion?
- Is the contact's role relevant?
- What is a useful, specific first message?
Doing this manually is slow. Asking an LLM to “score these leads” is fast, but often unreliable: the model may invent evidence, silently change your criteria, or produce a confident score without showing its work.
This tutorial shows how to use the Evidence-Based B2B Lead Qualification & Outreach Actor on Apify to create a ranked, reviewable outreach list from company URLs.
The Actor is designed for prioritization, not automatic sending. It researches public company information, evaluates the criteria you define, validates citations, calculates deterministic scores, and drafts LinkedIn and email copy for human review.
What you will build
For each lead, the Actor returns:
- a company and operating-context summary;
- an assessment for every qualification criterion;
- evidence URLs and evidence chunk IDs;
- disqualifier matches and red flags;
- ICP fit, evidence confidence, contact relevance, and outreach-readiness scores;
- a concise LinkedIn message and optional email;
- warnings and verification metadata.
The result is a shortlist you can inspect before anyone sends a message.
The Actor does not scrape LinkedIn, find personal email addresses, send messages, or replace human judgment.
Prerequisites
You need:
- an Apify account;
- access to the Actor from its Apify Store page;
- an OpenRouter, OpenAI, Anthropic, Gemini, DeepSeek, Mistral, Groq, ZenMux, xAI, Qwen, or NVIDIA API key;
- optionally, a Tavily API key for broader public-web research.
For reusable runs, save keys as secret environment variables in Apify under Source → Environment variables. For OpenRouter use OPENROUTER_API_KEY; for Tavily use TAVILY_API_KEY. Do not put keys in a README, source file, dataset, or article.
1. Define the offer and the ICP
The quality of the result depends more on the criteria than on the wording of the prompt.
Describe:
- the problem you solve;
- the type of company that benefits;
- observable signals that indicate a fit;
- hard disqualifiers;
- the roles you want to reach.
For example, an automation consultancy could define:
- Offer: automate document-heavy approval workflows across quality, operations, marketing, legal, and suppliers.
- ICP: mid-market food and beverage companies with export or private-label operations.
- Criteria: exports to multiple countries; manages multilingual packaging artwork; has quality/compliance documentation; involves multiple departments in approvals; coordinates external suppliers.
- Target roles: Quality Director, R&D Director, Operations Director, Regulatory Affairs Manager.
Keep lead notes factual. “The company has a problem we can solve” is a hypothesis, not evidence.
2. Configure a run
Here is a sanitized input example:
{
"aiProvider": "openrouter",
"model": "openrouter/auto",
"researchProvider": "tavily",
"researchDepth": "standard",
"verificationMode": "standard",
"language": "en",
"messageStyle": "soft-consultative",
"maxMessageChars": 300,
"includeEmail": true,
"maxConcurrency": 2,
"idealCustomerProfile": "Mid-market food and beverage companies with export, private-label, and complex quality or compliance workflows.",
"offerDescription": "We automate document-heavy workflows for packaging artwork, multilingual labels, quality documentation, export compliance, and cross-team approvals.",
"outreachGoal": "Start a short conversation to evaluate a small pilot.",
"qualificationCriteria": [
"Exports to multiple countries",
"Manages multilingual packaging or artwork",
"Has quality or compliance documentation workflows",
"Involves multiple departments in approvals",
"Uses external suppliers or partners in the process"
],
"targetCountries": ["Italy"],
"targetIndustries": ["Food & beverage", "Agroalimentare", "Private label"],
"targetRoles": [
"Quality & R&D Director",
"Quality Director",
"Operations Director",
"Regulatory Affairs Manager"
],
"leads": [
{
"fullName": "",
"jobTitle": "Quality & R&D Director",
"companyName": "Example Food Company",
"companyUrl": "https://example.com",
"linkedinUrl": "",
"notes": "Food producer with export and private-label operations."
}
]
}
The example uses openrouter/auto deliberately. openrouter/free is convenient for a first test, but free-model availability and daily limits are variable. For production, use automatic routing or pin an exact model that your account can access.
3. Choose the research mode
The Actor supports two research providers:
- website-only: lightweight extraction from the company website;
- Tavily: adds public web search and extraction using your Tavily key.
Research depth controls how much of the company website is inspected:
-
homepage: homepage only; -
standard: homepage plus up to three useful internal pages; -
deep: homepage plus up to five useful internal pages.
Verification can be standard or deep. Deep verification adds an independent evidence-checking pass, which costs more model usage.
4. Run the Actor and inspect the dataset
Start with one or two leads. Open the run's dataset and check:
- Are the evidence URLs relevant and reachable?
- Does every criterion have a clear assessment?
- Are missing facts marked as unknown instead of guessed?
- Is the contact role genuinely relevant?
- Does the message refer to observed evidence rather than a generic pain point?
- Are warnings visible?
A useful output looks like this:
{
"status": "succeeded",
"qualification": {
"icp_fit_score": 83,
"evidence_confidence_score": 82,
"contact_relevance_score": 100,
"outreach_readiness_score": 86,
"priority": "high",
"criteria_assessment": [
{
"criterion": "Exports to multiple countries",
"status": "match",
"evidence_level": "direct",
"evidence_urls": ["https://example.com/export"],
"rationale": "The company describes distribution in multiple markets."
}
],
"disqualifier_matches": [],
"red_flags": []
},
"outreach": {
"icebreaker": "I noticed your export activity across multiple markets.",
"linkedin_dm": "Hi Alex, I noticed your export activity across multiple markets. We help teams simplify document-heavy approval workflows. Would a short conversation about one concrete process be useful?",
"cta": "Open to a 15-minute chat?"
},
"sources": ["https://example.com/export"],
"warnings": []
}
The numeric scores are calculated in code from the configured assessments. The language model can explain evidence, but it does not get to invent the final score.
5. Export and review
Export the dataset as JSON, CSV, or Excel depending on your workflow. A common process is:
- filter for high outreach-readiness scores;
- remove leads with red flags or weak evidence;
- review the source pages;
- personalize the message;
- send through your approved sales process.
Do not treat a high score as permission to contact someone. Check applicable privacy, marketing, and platform rules before outreach.
Troubleshooting: a 429 from OpenRouter
If a run starts normally and then ends with:
openrouter API error 429
Rate limit exceeded: free-models-per-day
the failure is in the model provider, not in Tavily research or Apify input validation. The free-model pool has reached its daily limit or a selected free provider is temporarily throttled.
Fix it by:
- setting
"model": "openrouter/auto"; - selecting an exact paid model available in your OpenRouter account;
- adding the required OpenRouter credits;
- waiting for the provider quota to reset.
A missing or invalid key normally produces an authentication error such as 401 or 403. A 429 means the request reached OpenRouter but was rate-limited.
Cost model
The Actor uses Apify pay-per-event pricing: the published event is displayed as lead and is priced at $20 per 1,000 results. AI and Tavily usage are bring-your-own-key costs paid directly to those providers. Test with one lead first, then set a maximum run cost before processing a large list.
Security and reliability notes
- Only public company information is used.
- Private networks, localhost, cloud metadata, embedded credentials, and unsafe URL schemes are rejected.
- Web and search content is treated as untrusted data.
- Fabricated evidence IDs cannot support a score.
- Failed leads are recorded with error details.
- If every lead fails, the Apify run is marked Failed instead of looking successful with an empty result.
Next steps
Start with ten representative companies from one niche. Measure:
- percentage of leads with at least one direct evidence source;
- percentage of high-priority leads accepted after human review;
- time saved per reviewed lead;
- reply rate compared with an unresearched list.
Then refine the ICP criteria. Better observable criteria usually improve the list more than a longer prompt.
If you build on this workflow, share what you learned: which evidence was useful, which criteria were too vague, and which model gave the most reliable structured output.
Top comments (0)