curl --request POST \
--url https://app.manypi.com/api/leads/research \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"criteria": {
"description": "Find 25 e-commerce agencies building Shopify stores for DTC brands",
"locations": [
"Germany",
"Austria"
],
"industries": [
"Marketing agency",
"E-commerce"
],
"company_size": "5-50 employees",
"titles": [
"Founder",
"Head of Growth"
],
"exclusions": [
"SEO-only agencies"
],
"required_fields": [
"email"
],
"extra_columns": [
{
"name": "Ecommerce platform",
"description": "Shopify, WooCommerce, custom or unknown"
}
]
}
}
'import requests
url = "https://app.manypi.com/api/leads/research"
payload = { "criteria": {
"description": "Find 25 e-commerce agencies building Shopify stores for DTC brands",
"locations": ["Germany", "Austria"],
"industries": ["Marketing agency", "E-commerce"],
"company_size": "5-50 employees",
"titles": ["Founder", "Head of Growth"],
"exclusions": ["SEO-only agencies"],
"required_fields": ["email"],
"extra_columns": [
{
"name": "Ecommerce platform",
"description": "Shopify, WooCommerce, custom or unknown"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
criteria: {
description: 'Find 25 e-commerce agencies building Shopify stores for DTC brands',
locations: ['Germany', 'Austria'],
industries: ['Marketing agency', 'E-commerce'],
company_size: '5-50 employees',
titles: ['Founder', 'Head of Growth'],
exclusions: ['SEO-only agencies'],
required_fields: ['email'],
extra_columns: [
{
name: 'Ecommerce platform',
description: 'Shopify, WooCommerce, custom or unknown'
}
]
}
})
};
fetch('https://app.manypi.com/api/leads/research', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.manypi.com/api/leads/research",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'criteria' => [
'description' => 'Find 25 e-commerce agencies building Shopify stores for DTC brands',
'locations' => [
'Germany',
'Austria'
],
'industries' => [
'Marketing agency',
'E-commerce'
],
'company_size' => '5-50 employees',
'titles' => [
'Founder',
'Head of Growth'
],
'exclusions' => [
'SEO-only agencies'
],
'required_fields' => [
'email'
],
'extra_columns' => [
[
'name' => 'Ecommerce platform',
'description' => 'Shopify, WooCommerce, custom or unknown'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.manypi.com/api/leads/research"
payload := strings.NewReader("{\n \"criteria\": {\n \"description\": \"Find 25 e-commerce agencies building Shopify stores for DTC brands\",\n \"locations\": [\n \"Germany\",\n \"Austria\"\n ],\n \"industries\": [\n \"Marketing agency\",\n \"E-commerce\"\n ],\n \"company_size\": \"5-50 employees\",\n \"titles\": [\n \"Founder\",\n \"Head of Growth\"\n ],\n \"exclusions\": [\n \"SEO-only agencies\"\n ],\n \"required_fields\": [\n \"email\"\n ],\n \"extra_columns\": [\n {\n \"name\": \"Ecommerce platform\",\n \"description\": \"Shopify, WooCommerce, custom or unknown\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.manypi.com/api/leads/research")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"criteria\": {\n \"description\": \"Find 25 e-commerce agencies building Shopify stores for DTC brands\",\n \"locations\": [\n \"Germany\",\n \"Austria\"\n ],\n \"industries\": [\n \"Marketing agency\",\n \"E-commerce\"\n ],\n \"company_size\": \"5-50 employees\",\n \"titles\": [\n \"Founder\",\n \"Head of Growth\"\n ],\n \"exclusions\": [\n \"SEO-only agencies\"\n ],\n \"required_fields\": [\n \"email\"\n ],\n \"extra_columns\": [\n {\n \"name\": \"Ecommerce platform\",\n \"description\": \"Shopify, WooCommerce, custom or unknown\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/leads/research")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"criteria\": {\n \"description\": \"Find 25 e-commerce agencies building Shopify stores for DTC brands\",\n \"locations\": [\n \"Germany\",\n \"Austria\"\n ],\n \"industries\": [\n \"Marketing agency\",\n \"E-commerce\"\n ],\n \"company_size\": \"5-50 employees\",\n \"titles\": [\n \"Founder\",\n \"Head of Growth\"\n ],\n \"exclusions\": [\n \"SEO-only agencies\"\n ],\n \"required_fields\": [\n \"email\"\n ],\n \"extra_columns\": [\n {\n \"name\": \"Ecommerce platform\",\n \"description\": \"Shopify, WooCommerce, custom or unknown\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"count": 123,
"profile": {},
"goal": "<string>",
"context": {},
"clamped": {
"requested": 123,
"allowed": 123,
"limit": 123,
"reason": "per_run",
"per_run_max": 123
},
"redirected": true,
"known": {},
"description": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Start a lead search
Launch the lead-generation agent against structured criteria, a saved search, or a set of seed leads (“find more like these”).
The run is asynchronous: poll GET /api/agents/runs/{id} with the returned run_id. Once leads are saved, GET /api/leads?campaign={run_id} lists them. The run may pause with a clarifying question — answer it with POST /api/agents/runs/{id}/reply and the same run continues.
How many leads the run looks for comes from the description itself: “find 50 agencies” asks for 50. With no number it is 20, or 1 when the description names one company. One run finds at most 250, and never more than the workspace has room for. criteria.count is saved with a saved search and shown on it, but does not set the size of a run. When a number you stated was lowered, the response carries clamped. A full workspace returns 403 with code: "lead_limit".
With a saved search. criteria sent alongside profile_id replaces the saved criteria as a whole — fields you leave out fall back to their defaults, not to the saved values. To change one field, read the saved search from GET /api/leads/research-profiles, merge your change, and send the full criteria. Because save defaults to true, the criteria you send are also written back to that saved search; send save: false to run without changing it.
Two responses that start no lead search. Both apply only to a typed request, with no profile_id and no seed_lead_ids:
- When
criteriacarries only a free-textdescriptionthat does not read as a request for leads, ManyPI starts a plain agent run instead and the response includesredirected: true. Sendcheck_intent: falseto skip that check. - When the description names leads the workspace already has, the response is
{ "known": {...}, "description": "..." }with norun_id, and no run starts. Sendforce_search: trueto search anyway.
An API key needs Leads & companies: Read & write (leads:write), or the legacy write permission.
curl --request POST \
--url https://app.manypi.com/api/leads/research \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"criteria": {
"description": "Find 25 e-commerce agencies building Shopify stores for DTC brands",
"locations": [
"Germany",
"Austria"
],
"industries": [
"Marketing agency",
"E-commerce"
],
"company_size": "5-50 employees",
"titles": [
"Founder",
"Head of Growth"
],
"exclusions": [
"SEO-only agencies"
],
"required_fields": [
"email"
],
"extra_columns": [
{
"name": "Ecommerce platform",
"description": "Shopify, WooCommerce, custom or unknown"
}
]
}
}
'import requests
url = "https://app.manypi.com/api/leads/research"
payload = { "criteria": {
"description": "Find 25 e-commerce agencies building Shopify stores for DTC brands",
"locations": ["Germany", "Austria"],
"industries": ["Marketing agency", "E-commerce"],
"company_size": "5-50 employees",
"titles": ["Founder", "Head of Growth"],
"exclusions": ["SEO-only agencies"],
"required_fields": ["email"],
"extra_columns": [
{
"name": "Ecommerce platform",
"description": "Shopify, WooCommerce, custom or unknown"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
criteria: {
description: 'Find 25 e-commerce agencies building Shopify stores for DTC brands',
locations: ['Germany', 'Austria'],
industries: ['Marketing agency', 'E-commerce'],
company_size: '5-50 employees',
titles: ['Founder', 'Head of Growth'],
exclusions: ['SEO-only agencies'],
required_fields: ['email'],
extra_columns: [
{
name: 'Ecommerce platform',
description: 'Shopify, WooCommerce, custom or unknown'
}
]
}
})
};
fetch('https://app.manypi.com/api/leads/research', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.manypi.com/api/leads/research",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'criteria' => [
'description' => 'Find 25 e-commerce agencies building Shopify stores for DTC brands',
'locations' => [
'Germany',
'Austria'
],
'industries' => [
'Marketing agency',
'E-commerce'
],
'company_size' => '5-50 employees',
'titles' => [
'Founder',
'Head of Growth'
],
'exclusions' => [
'SEO-only agencies'
],
'required_fields' => [
'email'
],
'extra_columns' => [
[
'name' => 'Ecommerce platform',
'description' => 'Shopify, WooCommerce, custom or unknown'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.manypi.com/api/leads/research"
payload := strings.NewReader("{\n \"criteria\": {\n \"description\": \"Find 25 e-commerce agencies building Shopify stores for DTC brands\",\n \"locations\": [\n \"Germany\",\n \"Austria\"\n ],\n \"industries\": [\n \"Marketing agency\",\n \"E-commerce\"\n ],\n \"company_size\": \"5-50 employees\",\n \"titles\": [\n \"Founder\",\n \"Head of Growth\"\n ],\n \"exclusions\": [\n \"SEO-only agencies\"\n ],\n \"required_fields\": [\n \"email\"\n ],\n \"extra_columns\": [\n {\n \"name\": \"Ecommerce platform\",\n \"description\": \"Shopify, WooCommerce, custom or unknown\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.manypi.com/api/leads/research")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"criteria\": {\n \"description\": \"Find 25 e-commerce agencies building Shopify stores for DTC brands\",\n \"locations\": [\n \"Germany\",\n \"Austria\"\n ],\n \"industries\": [\n \"Marketing agency\",\n \"E-commerce\"\n ],\n \"company_size\": \"5-50 employees\",\n \"titles\": [\n \"Founder\",\n \"Head of Growth\"\n ],\n \"exclusions\": [\n \"SEO-only agencies\"\n ],\n \"required_fields\": [\n \"email\"\n ],\n \"extra_columns\": [\n {\n \"name\": \"Ecommerce platform\",\n \"description\": \"Shopify, WooCommerce, custom or unknown\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/leads/research")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"criteria\": {\n \"description\": \"Find 25 e-commerce agencies building Shopify stores for DTC brands\",\n \"locations\": [\n \"Germany\",\n \"Austria\"\n ],\n \"industries\": [\n \"Marketing agency\",\n \"E-commerce\"\n ],\n \"company_size\": \"5-50 employees\",\n \"titles\": [\n \"Founder\",\n \"Head of Growth\"\n ],\n \"exclusions\": [\n \"SEO-only agencies\"\n ],\n \"required_fields\": [\n \"email\"\n ],\n \"extra_columns\": [\n {\n \"name\": \"Ecommerce platform\",\n \"description\": \"Shopify, WooCommerce, custom or unknown\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"count": 123,
"profile": {},
"goal": "<string>",
"context": {},
"clamped": {
"requested": 123,
"allowed": 123,
"limit": 123,
"reason": "per_run",
"per_run_max": 123
},
"redirected": true,
"known": {},
"description": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Authorizations
Body
Response
A run was created — or, when known is present instead of run_id, the workspace already holds the leads the description names and no run was started.
