# Backlink Building Agent — 3-Stage Pipeline, Pay Per Outcome (`themineworks/backlink-building-agent`) Actor

Full backlink outreach pipeline: discovers real guest-post & resource-link prospects for your topic, extracts a verified contact from each site, and drafts a personalized outreach email with AI. Billed only for outreach-ready leads. Never sends email.

- **URL**: https://apify.com/themineworks/backlink-building-agent.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** SEO tools, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $36.00 / 1,000 complete outreach leads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🔗 Backlink Building Agent: Discover, Contact & Draft Outreach

### Overview

Backlink Building Agent runs the real backlink-outreach workflow end to end: give it a topic and your own site, and it (1) discovers real candidate pages worth pitching for a backlink, (2) extracts a real contact from each candidate site, and (3) drafts a genuinely personalized outreach email for you to review and send. It is a 3-stage agent pipeline, not a single-source scraper — most of the value is in wiring discovery, contact extraction, and AI drafting together so you end a run with something you can actually act on, not a spreadsheet of raw URLs.

**This actor never sends email.** It drafts outreach for a human to review and send themselves. Auto-sending is a much bigger scope with real consent and deliverability implications, and this actor deliberately stays out of that.

Billing is outcome-tiered, not per-row: you pay the most for a fully outreach-ready lead (discovered, contacted, and drafted), less for a lead that only made it partway, and nothing at all when a run finds nothing usable.

✅ No login required | ✅ Real contact extraction, not guessed emails | ✅ AI-personalized drafts, not templates | ✅ Pay per outcome | ✅ MCP-ready for AI agents

### How it works

**Stage 1 — Discover.** For each topic you give it, the actor runs a set of standard backlink-prospecting search queries (topic + "write for us", "guest post guidelines", "helpful resources", etc., depending on your outreach goal) against Google Search, over Apify's purpose-built GOOGLE\_SERP proxy tier. Results are filtered twice: a denylist drops reference sites, search engines and social platforms, and a relevance gate requires the actual footprint phrase to appear in the result before it counts as a candidate. A degraded or irrelevant search never produces fabricated prospects — it produces an honest zero.

**Stage 2 — Extract a contact.** Each qualified candidate domain is handed to the sibling actor [website-contact-finder](https://apify.com/themineworks/website-contact-finder), called directly via the Apify API, which crawls the homepage plus contact/about/team pages for a real email, phone number, or social profile. This actor absorbs that call's own small per-domain cost rather than adding it as a separate line item on your bill — you pay one price for the outcome.

**Stage 3 — Draft outreach.** If a contact was found, the actor drafts a short, specific email with Gemini: it must reference something concrete from the target page (not generic flattery), explain why your content is relevant to *their* audience, and end with a single soft ask. A quality gate rejects anything that reads as templated (too short, leftover `[placeholder]` brackets, or no actual reference to the target page) — that draft is simply not produced rather than shipped as a weak one.

### 🧾 Input configuration

```json
{
  "topics": ["sustainable jewelry"],
  "siteUrl": "https://example.com",
  "siteDescription": "We publish independently reviewed guides on lab-grown diamonds and ethical jewelry buying, including a widely-cited guide comparing certification standards.",
  "senderName": "Alex",
  "senderRole": "Content lead",
  "outreachGoal": "resource_link",
  "maxProspectsPerTopic": 5,
  "maxOutreachEmails": 5,
  "contactPagesPerSite": 5,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["GOOGLE_SERP"] }
}
```

| Field | Description |
| --- | --- |
| `topics` | Niche keywords to prospect for. Each one is searched independently. |
| `siteUrl` | Your site/page URL. Used for personalization and so the agent never pitches your own domain to itself. |
| `siteDescription` | 1-3 sentences on what you're promoting. The single biggest lever for draft quality — be specific. |
| `senderName` / `senderRole` | Used in the drafted email's signature. |
| `outreachGoal` | `guest_post`, `resource_link`, or `general_collaboration` — changes both the search footprints and the email's ask. |
| `maxProspectsPerTopic` | How many footprint-matched candidates to discover per topic. Discovery is cheap (search only) and does not by itself drive cost. |
| `maxOutreachEmails` | **The real spend/time cap.** How many discovered prospects are carried through contact-extraction + drafting, across all topics combined, in this run. |
| `contactPagesPerSite` | Pages checked per candidate site for a contact (passed to website-contact-finder). |
| `proxyConfiguration` | Apify Proxy for the search stage (stage 1). GOOGLE\_SERP — Apify's purpose-built Google Search proxy tier — is the default and what this actor is tuned for; residential proxy was tested and actually returns worse, query-degraded results for this specific target. |

### 📤 Output format

Every discovered prospect produces one row, tagged with how far it got:

```json
{
  "topic": "lab-grown diamonds",
  "outreach_goal": "resource_link",
  "pipeline_stage": "complete_outreach_lead",
  "target_domain": "example-jewelry-blog.com",
  "target_url": "https://example-jewelry-blog.com/resources",
  "target_title": "Ethical Jewelry Resources & Further Reading",
  "target_snippet": "A curated list of resources for buyers researching ethical and lab-grown jewelry options.",
  "footprint_matched": "helpful resources",
  "contact_email": "editor@example-jewelry-blog.com",
  "contact_phone": null,
  "contact_socials": null,
  "contact_source": "website-contact-finder",
  "outreach_subject": "A certification-standards resource for your ethical jewelry list",
  "outreach_body": "Hi there, I came across your curated resources page for ethical and lab-grown jewelry buyers...",
  "personalization_note": "References \"Ethical Jewelry Resources & Further Reading\" on example-jewelry-blog.com.",
  "scraped_at": "2026-08-02T10:00:00.000Z"
}
```

| Field | Description |
| --- | --- |
| `pipeline_stage` | `qualified_prospect` (discovered, no contact found), `contacted_prospect` (contact found, draft failed/skipped), or `complete_outreach_lead` (all three stages succeeded) |
| `target_domain` / `target_url` | The candidate site and specific page that matched a prospecting footprint |
| `footprint_matched` | Which search pattern surfaced it (e.g. "write for us", "helpful resources") |
| `contact_email` / `contact_phone` / `contact_socials` | Best contact found, present from `contacted_prospect` onward |
| `outreach_subject` / `outreach_body` | The drafted email — present only at `complete_outreach_lead`. **Review before sending; this actor never sends it for you.** |
| `personalization_note` | What the draft specifically referenced, for your own QA pass |

### 💰 Pricing: outcome-tiered, not per-row

Backlink outreach tools on Apify are typically priced per finished outcome rather than per raw scraped row, because a raw URL and a send-ready lead are very different things to build and very different things to be worth. This actor follows the same logic with three tiers instead of one flat price, so you are never charged the full price for a partial result:

| Outcome | What happened | Why this tier |
| --- | --- | --- |
| **Complete outreach lead** | Discovered + contact extracted + email drafted | The full product: something you can review and send today |
| **Contacted prospect** | Discovered + contact extracted, drafting failed or was skipped | You still got a real, verified contact to reach out to |
| **Qualified prospect** | A real footprint-matched candidate site, no public contact found | Still a genuine, filtered lead worth manual follow-up |
| *(nothing usable)* | No candidates matched, or nothing survived the relevance gate | **Free — nothing is ever charged for an empty or degraded run** |

Pricing is pay-per-event with the standard tiered discount for higher Apify plans. Check the Actor's pricing tab for current rates.

### 💼 Common use cases

**SEO backlink outreach**
Turn a target keyword or niche into a working outreach list without hiring an outreach VA to do the search-and-scrape legwork by hand.

**PR & media outreach**
Point it at a topic your story/data is relevant to and get a starting list of relevant sites plus a drafted pitch angle for each.

**Content promotion**
After publishing a new guide or piece of original research, use it to find resource pages and roundups it's a genuine fit for.

**Agency link-building at scale**
Run it per client niche to produce a first-pass prospect + draft list, then have a human do final QA and send.

### Honest limits (read before you run a big batch)

- **Discovery quality depends on how much "write for us" / "resources" content already exists for your niche.** Broad, well-covered niches (SaaS, finance, health) turn up plenty of candidates. Narrow or under-written niches can legitimately return few or none — that is an honest signal about the niche, not a broken run. See `BACKLINK-OUTREACH.md` in our own build notes: even hand-researching our own niche found genuinely neutral targets are rare.
- **Contact coverage is never 100%.** Not every site publishes a public email; some only have a contact form, which this actor cannot fill out for you.
- **AI drafts still need a human read before sending.** The quality gate rejects obviously generic output, but it cannot verify facts about the target site beyond what the search snippet says — skim each draft before you send it.
- **This actor never sends anything.** No email account is connected, and there is no send feature to turn on.

### FAQ

**Does this actually send the outreach emails?**
No. It drafts a subject and body for each complete lead. You copy it into your own email client (or a mail-merge tool) and send it yourself, after your own review.

**How is a "contact" verified?**
It is extracted from a real, public page on the target site (not looked up in a third-party database or guessed from a name pattern) by the sibling [website-contact-finder](https://apify.com/themineworks/website-contact-finder) actor.

**What if my niche returns very few results?**
That's an honest outcome, not a bug — see "Honest limits" above. Try a broader topic phrasing, or a different `outreachGoal` (resource-link footprints and guest-post footprints surface different sites).

**Can I use it in an AI agent?**
Yes. It's exposed as an MCP tool. See below.

### Use in Claude, ChatGPT & any MCP agent

```
https://mcp.apify.com/?tools=themineworks/backlink-building-agent
```

Or call it programmatically with the Apify client:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/backlink-building-agent').call({
  topics: ['sustainable jewelry'],
  siteUrl: 'https://example.com',
  siteDescription: 'We publish independently reviewed guides on ethical jewelry buying.',
  senderName: 'Alex',
  outreachGoal: 'resource_link',
  maxOutreachEmails: 5,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### 🛠️ Complete your outreach pipeline

- **[Website Contact Scraper](https://apify.com/themineworks/website-contact-finder)**: the sibling actor this pipeline calls for stage 2 — use it standalone if you already have your own list of target domains.
- **[B2B Leads Finder](https://apify.com/themineworks/b2b-leads-finder)**: find named decision-makers (not just a general inbox) at any company.
- **[Google News Scraper](https://apify.com/themineworks/google-news)**: monitor press coverage of your topic for fresh PR/media outreach angles.

Questions or need a custom field set? Reach out through the Apify profile.

# Actor input Schema

## `topics` (type: `array`):

Keywords describing your site's niche or the article you want links to (e.g. 'sustainable jewelry', 'B2B SaaS onboarding', 'vegan meal prep'). Each topic is searched for real guest-post, 'write for us' and resource-page opportunities.

## `siteUrl` (type: `string`):

The URL of the site or page you want a backlink to. Used to personalize outreach emails and to make sure the agent never pitches your own domain to itself.

## `siteDescription` (type: `string`):

1-3 sentences on what your site or the specific article is about and why it is relevant to pitch. This is the single biggest lever for how personalized the drafted emails are, be specific.

## `senderName` (type: `string`):

Name to sign outreach emails with.

## `senderRole` (type: `string`):

e.g. 'Content lead at Example.com'. Appears in the email signature.

## `outreachGoal` (type: `string`):

What you are asking the target site for. Changes both the search footprints used in discovery and the angle of the drafted email.

## `maxProspectsPerTopic` (type: `integer`):

How many footprint-matched candidate sites to discover per topic before filtering. Discovery is cheap (search only); this does not by itself drive cost.

## `maxOutreachEmails` (type: `integer`):

Hard cap on how many discovered prospects are carried through contact-extraction and email drafting in this run, across ALL topics combined. This is the real cost/time driver (each one calls the sibling contact-finder actor plus an LLM call) — it bounds both run time and spend regardless of how many topics or prospects are discovered.

## `contactPagesPerSite` (type: `integer`):

Passed to the contact-extraction stage: how many pages of each candidate site to check for an email, phone or social contact (homepage + /contact, /about, /write-for-us, etc).

## `proxyConfiguration` (type: `object`):

Apify Proxy used for search-engine discovery (stage 1). GOOGLE\_SERP is Apify's purpose-built tier for scraping Google Search and is what this actor is tuned for; RESIDENTIAL was tested and actually returns WORSE (query-degraded) results for this target. The contact-extraction stage (2) always uses RESIDENTIAL internally regardless of this setting.

## Actor input object example

```json
{
  "topics": [
    "sustainable jewelry"
  ],
  "siteUrl": "https://example.com",
  "siteDescription": "We publish independently reviewed guides on lab-grown diamonds and ethical jewelry buying, including a widely-cited guide comparing lab-grown vs mined diamond certification standards.",
  "senderName": "Alex",
  "senderRole": "Content lead",
  "outreachGoal": "resource_link",
  "maxProspectsPerTopic": 5,
  "maxOutreachEmails": 5,
  "contactPagesPerSite": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "topics": [
        "sustainable jewelry"
    ],
    "siteUrl": "https://example.com",
    "siteDescription": "We publish independently reviewed guides on lab-grown diamonds and ethical jewelry buying, including a widely-cited guide comparing lab-grown vs mined diamond certification standards.",
    "senderName": "Alex",
    "senderRole": "Content lead",
    "outreachGoal": "resource_link",
    "maxProspectsPerTopic": 5,
    "maxOutreachEmails": 5,
    "contactPagesPerSite": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "GOOGLE_SERP"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/backlink-building-agent").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "topics": ["sustainable jewelry"],
    "siteUrl": "https://example.com",
    "siteDescription": "We publish independently reviewed guides on lab-grown diamonds and ethical jewelry buying, including a widely-cited guide comparing lab-grown vs mined diamond certification standards.",
    "senderName": "Alex",
    "senderRole": "Content lead",
    "outreachGoal": "resource_link",
    "maxProspectsPerTopic": 5,
    "maxOutreachEmails": 5,
    "contactPagesPerSite": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["GOOGLE_SERP"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/backlink-building-agent").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "topics": [
    "sustainable jewelry"
  ],
  "siteUrl": "https://example.com",
  "siteDescription": "We publish independently reviewed guides on lab-grown diamonds and ethical jewelry buying, including a widely-cited guide comparing lab-grown vs mined diamond certification standards.",
  "senderName": "Alex",
  "senderRole": "Content lead",
  "outreachGoal": "resource_link",
  "maxProspectsPerTopic": 5,
  "maxOutreachEmails": 5,
  "contactPagesPerSite": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}' |
apify call themineworks/backlink-building-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=themineworks/backlink-building-agent",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zdskW3MX9HySKexAC/builds/xwJpdnr2gN0sPnRHg/openapi.json
