logo-darkPipe0
Searches

Quickstart

Use Searches to find companies and people using filters. Searching for companies & people is often called "prospecting", "list building" or "sourcing".

With searches, you combine datasets from multiple providers. The search catalog lists all available datasets.

Making requests

This request fetches a list of companies using the people:profiles:icypeas@1 dataset.

const result = await fetch("https://api.pipe0.com/v1/searches/run", {
    method: "POST",
    headers: {
        "Authorization": `Bearer ${API_KEY}`,
        "Content-Type": "application/json"
    },
    body: JSON.stringify({
        config: {
            environment: "production",
            dedup: {
                strategy: "default"
            }
        },
        searches: [
            {
                search_id: "people:profiles:icypeas@1",
                config: {
                    limit: 100,
                    filters: {
                        industry: {
                            include: ["Software Development"]
                        }
                    }
                }
            },
        ],
    })
});

You can find the list of available filters per dataset in the search catalog.

Append additional searches to the searches property to combine multiple searches in one request.

Getting the task result

The request to POST https://api.pipe0.com/v1/searches/run will create a search task. To get the result of the task, poll the GET https://api.pipe0.com/v1/searches/check/{task_id} endpoint until the task status is completed.

const result = await fetch("https://api.pipe0.com/v1/searches/check/${taskId}", {
    method: "POST",
    headers: {
        "Authorization": `Bearer ${API_KEY}`
    }
});

The result will look something like this:


{
	"results": [
		{
			"name": {
				"value": "Gayle Pouros",
                "type": "string",
				"format": "text",
				"status": "completed"
				"ui": {},
			},
			"job_title": {
				"value": "Product Intranet Manager",
                "type": "string",
				"format": "text",
				"status": "completed",
				"ui": {},
			},
            ...
		},
		...
	]
}

The result of a search can be the input for a pipes request (enrichment). Under the hood, this uses input expansion.

Getting the result without polling

Instead of creating your task with the endpoint POST https://api.pipe0.com/v1/searches/run use the endpoint POST https://api.pipe0.com/v1/searches/run/sync. Use the same payload for both endpoints. The /sync endpoint will try to return the completed result in one round-trip.

Read more about the trade-offs between async vs sync requests here.

On this page