{
  "openapi": "3.0.1",
  "info": {
    "title": "Backlink Building Agent — 3-Stage Pipeline, Pay Per Outcome",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "xwJpdnr2gN0sPnRHg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~backlink-building-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-backlink-building-agent",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/themineworks~backlink-building-agent/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-backlink-building-agent",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/themineworks~backlink-building-agent/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-backlink-building-agent",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "topics",
          "siteUrl",
          "siteDescription"
        ],
        "properties": {
          "topics": {
            "title": "Topics / niches to prospect",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "siteUrl": {
            "title": "Your website (to promote)",
            "type": "string",
            "description": "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": {
            "title": "About your site / content",
            "type": "string",
            "description": "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": {
            "title": "Your name",
            "type": "string",
            "description": "Name to sign outreach emails with."
          },
          "senderRole": {
            "title": "Your role / company (optional)",
            "type": "string",
            "description": "e.g. 'Content lead at Example.com'. Appears in the email signature."
          },
          "outreachGoal": {
            "title": "Outreach goal",
            "enum": [
              "guest_post",
              "resource_link",
              "general_collaboration"
            ],
            "type": "string",
            "description": "What you are asking the target site for. Changes both the search footprints used in discovery and the angle of the drafted email.",
            "default": "resource_link"
          },
          "maxProspectsPerTopic": {
            "title": "Max candidate sites per topic",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many footprint-matched candidate sites to discover per topic before filtering. Discovery is cheap (search only); this does not by itself drive cost.",
            "default": 8
          },
          "maxOutreachEmails": {
            "title": "Max outreach-ready leads per run (spend cap)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "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.",
            "default": 10
          },
          "contactPagesPerSite": {
            "title": "Pages to check per site for a contact",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "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).",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "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.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}