Agency Lead Gen Pipeline
Pricing
Pay per usage
Go to Apify Store
Agency Lead Gen Pipeline
Pricing
Pay per usage
You can access the Agency Lead Gen Pipeline programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "1.0", "x-build-id": "38nZMt2tJjudaDAHC" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/ryanclinton~agency-lead-gen-pipeline/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-ryanclinton-agency-lead-gen-pipeline", "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/ryanclinton~agency-lead-gen-pipeline/runs": { "post": { "operationId": "runs-sync-ryanclinton-agency-lead-gen-pipeline", "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/ryanclinton~agency-lead-gen-pipeline/run-sync": { "post": { "operationId": "run-sync-ryanclinton-agency-lead-gen-pipeline", "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": [ "serviceCategory" ], "properties": { "serviceCategory": { "title": "Agency service category", "type": "string", "description": "The agency service category to search for across directories. Examples: digital-marketing, seo, ppc, social-media, content-marketing.", "default": "digital-marketing" }, "location": { "title": "Location filter", "type": "string", "description": "City, state, or country to filter agencies by. Leave blank for global results.", "default": "United States" }, "maxAgencies": { "title": "Max agencies to process", "minimum": 1, "maximum": 500, "type": "integer", "description": "Total number of unique agencies to run through the full pipeline. Set lower for faster, cheaper runs.", "default": 50 }, "directorySources": { "title": "Directory sources", "type": "array", "description": "Which agency directories to scrape. Valid values: clutch, sortlist, agencyspotter, designrush.", "default": [ "clutch", "sortlist", "agencyspotter", "designrush" ], "items": { "type": "string" } }, "senderName": { "title": "Sender display name", "type": "string", "description": "The name that appears in the From field of all emails sent by this pipeline. Example: Jane at Acme Corp." }, "senderEmail": { "title": "Sender email address", "type": "string", "description": "The email address emails are sent from. Must be verified and authenticated (SPF/DKIM/DMARC) on your email provider." }, "emailProvider": { "title": "Email provider", "enum": [ "smtp", "sendgrid", "mailgun" ], "type": "string", "description": "How to send emails. SMTP works with any provider. SendGrid and Mailgun use their REST APIs." }, "smtpHost": { "title": "SMTP host", "type": "string", "description": "Required when emailProvider is smtp. Examples: smtp-relay.brevo.com, smtp.sendgrid.net, smtp.mailgun.org, email-smtp.us-east-1.amazonaws.com, smtp.gmail.com." }, "smtpPort": { "title": "SMTP port", "minimum": 1, "maximum": 65535, "type": "integer", "description": "Required when emailProvider is smtp. Use 587 for STARTTLS (recommended) or 465 for SSL.", "default": 587 }, "smtpUser": { "title": "SMTP username", "type": "string", "description": "Required when emailProvider is smtp. Usually your provider account email address." }, "smtpPass": { "title": "SMTP password or API key", "type": "string", "description": "Required when emailProvider is smtp. Your SMTP password or provider-specific SMTP API key." }, "apiKey": { "title": "REST API key", "type": "string", "description": "Required when emailProvider is sendgrid or mailgun. SendGrid: API key with Mail Send permission. Mailgun: private API key." }, "mailgunDomain": { "title": "Mailgun sending domain", "type": "string", "description": "Required when emailProvider is mailgun. Your verified Mailgun sending domain, e.g. mail.yourdomain.com." }, "unsubscribeUrl": { "title": "Unsubscribe URL", "type": "string", "description": "Your unsubscribe endpoint URL. Use {{sequenceId}} and {{email}} as placeholders — the actor renders them before inserting as {{unsubscribeLink}} in templates. Example: https://yourapp.com/unsubscribe?sid={{sequenceId}}&e={{email}}. Required — CAN-SPAM mandates a working opt-out in every commercial email." }, "rateLimitPerRun": { "title": "Max emails per run", "minimum": 1, "maximum": 10000, "type": "integer", "description": "Hard cap on emails sent during this pipeline run. Set to your provider daily limit: Brevo free = 300, SendGrid free = 100, Gmail = 2000, AWS SES sandbox = 200.", "default": 100 }, "emailTemplate": { "title": "Initial email template", "type": "string", "description": "HTML or plain text body for the first email. Available variables: {{firstName}}, {{companyName}}, {{topService}}, {{summarySnippet}}, {{unsubscribeLink}}.", "default": "Hi {{firstName}},\n\nI came across {{companyName}} and was impressed by your work in {{topService}}.\n\nI'd love to explore whether we might be a fit to work together.\n\nWould you have 15 minutes for a quick call this week?\n\nBest,\n[Your name]\n\n---\nTo unsubscribe: {{unsubscribeLink}}" }, "emailSubject": { "title": "Email subject line", "type": "string", "description": "Subject line for the initial email. Supports {{companyName}} and {{firstName}} variables.", "default": "Quick question for {{companyName}}" }, "followUpTemplate3": { "title": "Follow-up template (day 3)", "type": "string", "description": "Body template for the day-3 follow-up email. Same variables available. Leave blank to disable the day-3 follow-up.", "default": "" }, "followUpTemplate7": { "title": "Follow-up template (day 7)", "type": "string", "description": "Body template for the day-7 follow-up email. Same variables available. Leave blank to disable the day-7 follow-up.", "default": "" }, "finalStep": { "title": "Final step", "enum": [ "none", "outreach", "hubspot", "instantly", "pipedrive", "csv" ], "type": "string", "description": "What to do after enrichment and scoring. 'none' outputs enriched leads to the dataset and stops. Each CRM/tool option requires its own credentials below.", "default": "none" }, "skipOutreach": { "title": "Skip email sending (legacy — use finalStep instead)", "type": "boolean", "description": "Deprecated. Use finalStep = 'none' instead. If true and finalStep is not set, maps to finalStep = 'none' for backwards compatibility.", "default": true }, "dryRunEmails": { "title": "Dry run (log only, no actual API calls)", "type": "boolean", "description": "Render templates and log outputs but do not send emails or push records to CRMs. Applies to outreach, HubSpot, Instantly, and Pipedrive final steps.", "default": false }, "enableScoring": { "title": "Enable ICP scoring (Step 7)", "type": "boolean", "description": "Score each lead 0-100 against your Ideal Customer Profile before the final step. Adds icpScore, icpGrade, icpFactors, icpNotes to each lead record.", "default": false }, "icpTargetIndustries": { "title": "ICP target industries", "type": "array", "description": "Industries your ideal customers operate in. Used by the scoring engine — leads in these industries score higher. Examples: ecommerce, saas, healthcare.", "default": [], "items": { "type": "string" } }, "icpTargetCompanySizes": { "title": "ICP target company sizes", "type": "array", "description": "Target company size signals. Valid values: solo, small, mid, large. Matches the sizeSignal field from website content analysis.", "default": [], "items": { "type": "string" } }, "icpTargetServices": { "title": "ICP target services", "type": "array", "description": "Services you want your target agencies to offer. Examples: seo, paid-ads, email-marketing, web-design.", "default": [], "items": { "type": "string" } }, "icpMinScore": { "title": "Minimum ICP score to include", "minimum": 0, "maximum": 100, "type": "integer", "description": "Leads scoring below this threshold are dropped before the final step. 0 = include all. Requires enableScoring = true.", "default": 0 }, "hubspotAccessToken": { "title": "HubSpot private app access token", "type": "string", "description": "Required when finalStep = 'hubspot'. Generate a private app token in HubSpot Settings > Integrations > Private Apps with contacts and companies scopes." }, "instantlyApiKey": { "title": "Instantly API key", "type": "string", "description": "Required when finalStep = 'instantly'. Find your API key in Instantly.ai Settings > Integrations > API." }, "instantlyCampaignId": { "title": "Instantly campaign ID", "type": "string", "description": "Required when finalStep = 'instantly'. The UUID of the Instantly campaign to add leads to." }, "pipedriveApiToken": { "title": "Pipedrive API token", "type": "string", "description": "Required when finalStep = 'pipedrive'. Find your token in Pipedrive Settings > Personal preferences > API." }, "pipedriveCompanyDomain": { "title": "Pipedrive company domain", "type": "string", "description": "Required when finalStep = 'pipedrive'. Your Pipedrive subdomain, e.g. 'mycompany' for mycompany.pipedrive.com." }, "proxyConfiguration": { "title": "Proxy configuration", "type": "object", "description": "Required — all four agency directories (Clutch, Sortlist, AgencySpotter, DesignRush) block datacenter IPs. Residential proxies strongly recommended.", "default": { "useApifyProxy": true } } } }, "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 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Agency Lead Gen Pipeline from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: