# Introduction

[Pipe0](https://pipe0.com) is a framework for data enrichment. If you have some data about a person or company
but want more, you can do that in an infinite number of ways with pipe0.

The ability to enrich data is a requirement for many apps. You may dream of a
CRM that updates itself or a sales copilot helping SDRs prepare for upcoming meetings. Data enrichment
enables these features but is surprisingly hard to build.

At pipe0, we're on a mission to build the fastest, most extensible data enrichment framework in the world.

Here are some things pipe0 does for you:

- 🔌 Connect 50+ data providers
- 💨 Analyze enrichment pipelines and parallelize execution (we're fast!)
- 💰 Run enrichment, scraping and AI infrastructure at low cost (we take 0% margin on external providers)

## Client Library

This package contains a strongly typed client for [pipe0](https://pipe0.com).

## Pipes (Enrichment)

Perform enrichments and actions. See [pipes catalog](https://www.pipe0.com/resources/pipe-catalog) to find all available pipes.

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

const client = new Pipe0({ apiKey: API_KEY });

const data = await client.pipes.pipe({
  config: {
    environment: "sandbox",
  },
  pipes: [
    {
      pipe_id: "people:name:split@1",
    },
  ],
  input: [
    {
      id: "1",
      name: "John Doe",
    },
  ],
});
```

## Search

Find companies and people. See [search catalog](https://www.pipe0.com/docs/searches/search-catalog) to find all available searches.

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

const piper = new Pipe0({ apiKey: API_KEY });

const data = await piper.searches.search({
  config: {
    environment: "sandbox",
  },
  search: {
    search_id: "people:profiles:exa@1",
    config: {
      limit: 1,
      filters: {
        query: "Find all employees of pipe0",
      },
    },
  },
});
```

## Rate limits — handled for you

pipe0's API [never rejects correct clients](https://pipe0.com/docs/rate-limits): work is always
accepted and scheduled by task priority, driven by how many records your organization has
queued. This SDK implements that contract end to end:

- **429s are absorbed automatically** — `org-rate-limited` waits out the server's
  `Retry-After`; `queue-limit-exceeded` (the queued-record hard ceiling) backoff-retries the
  create. Only an exhausted wait budget throws (`Pipe0RateLimitError`). Opt out with
  `autoRetry429: false`.
- **`pipeInBatches` paces itself** — the rolling pool submits the next batch only when the
  capacity headers (`X-P1/P2/P3-Capacity`) say it would still be admitted at `priorityFloor`
  (default 2) or better, so large jobs never sink themselves to the slow lane.
- **Aborting cancels server-side** — when your `AbortSignal` fires, still-pending runs are
  canceled remotely and their records return to your capacity instantly. Opt out with
  `cancelOnAbort: false`.
- **Manual control** — `pipes.cancel(runId)` / `searches.cancel(runId)`, plus `pipe0.capacity`
  and the `onCapacity` callback for the live capacity snapshot.

## Useful links

- [Documentation](https://pipe0.com/resources/documentation)
- [Homepage](https://pipe0.com)
- [Blog](https://pipe0.com/blog)
- [Support](mailto:support@pipe0.com)
