logo-darkPipe0

Overview

While pipes add fields to records you already have, search creates the records. Use it when you start from a filter ("software engineers in Berlin") instead of a list. The search catalog lists every dataset and its filters.

This request fetches a list of people from the people:profiles:crustdata@2 dataset. Each request takes a single search. limit sets the page size; use pagination for more results.

import { Pipe0 } from "@pipe0/client";

const pipe0 = new Pipe0({ apiKey: process.env.PIPE0_API_KEY });

const result = await pipe0.searches.search({
  search: {
    search_id: "people:profiles:crustdata@2",
    config: {
      limit: 25,
      filters: {
        current_job_titles: {
          include: [
            "Software Engineer",
            "Developer",
          ],
        },
      },
    },
  },
});
console.log(result);
import requests

response = requests.post(
    "https://api.pipe0.com/v1/search/run/sync",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "search": {
            "search_id": "people:profiles:crustdata@2",
            "config": {
                "limit": 25,
                "filters": {
                    "current_job_titles": {
                        "include": [
                            "Software Engineer",
                            "Developer",
                        ],
                    },
                },
            },
        },
    },
)
print(response.json())
curl -X POST "https://api.pipe0.com/v1/search/run/sync" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "search": {
    "search_id": "people:profiles:crustdata@2",
    "config": {
      "limit": 25,
      "filters": {
        "current_job_titles": {
          "include": [
            "Software Engineer",
            "Developer"
          ]
        }
      }
    }
  }
}'

The response contains one result object per match, with the same field shape pipes use:

Response (truncated)
{
  "id": "jyg5w5p7unhcufkp8f7z5za8",
  "status": "completed",
  "search_id": "people:profiles:crustdata@2",
  "total_pages": 2764,
  "next_page": {
    // pass this as `search` to fetch the next page
  },
  "results": [
    {
      "name": {
        "type": "string",
        "value": "Gayle Pouros",
        "status": "completed"
        // ...
      },
      "job_title": {
        "type": "string",
        "value": "Product Intranet Manager",
        "status": "completed"
        // ...
      }
    }
    // ...
  ]
}

The full response carries more metadata than shown here. See the response object.

From search to enrichment

The results array is a valid input for a pipes request: search for people, then hand the results to pipes to add emails or phone numbers. No reshaping needed, because results come back as expanded field values.

See the Search then enrich example for the full pattern.

Paginate

Every search response includes a next_page field. Pass it as the search payload to fetch the next page; when it is null, there are no more results. See Pagination for a full iteration loop.

Search in bulk

The sync endpoint above waits for the result. If a search takes longer than 3 minutes, the sync endpoint returns 408; the search keeps running, and the error message carries the run id so you can still poll for the result. For large searches, create an async task with POST /v1/search/run (same payload), then poll GET /v1/search/check/{run_id} until status is completed or failed.

Poll for the result
const result = await fetch(`https://api.pipe0.com/v1/search/check/${runId}`, {
    method: "GET",
    headers: {
        "Authorization": `Bearer ${API_KEY}`
    }
});

Read more about the trade-offs in sync vs async.

Next steps

On this page