> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gethuntd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream People

> Every matching person in one request, as NDJSON

<Note>
  **Availability:** Enterprise plan, on `https://app.gethuntd.com`. Agency keys receive
  `403 ENDPOINT_NOT_ON_PLAN`. Uses no credits, and counts as one request against your rate limit.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -N -X GET "https://app.gethuntd.com/api/v1/public/people/stream?is_user=true" \
    -H "X-API-Key: hntd_abc12345_yoursecretkey"
  ```

  ```javascript JavaScript theme={null}
  import readline from 'node:readline';
  import { Readable } from 'node:stream';

  const response = await fetch(
    'https://app.gethuntd.com/api/v1/public/people/stream?is_user=true',
    { headers: { 'X-API-Key': process.env.HUNTD_API_KEY } }
  );

  const lines = readline.createInterface({ input: Readable.fromWeb(response.body) });
  for await (const line of lines) {
    if (!line.trim()) continue;
    const person = JSON.parse(line);
    if (person.error) throw new Error(person.error.code); // truncated stream
    handle(person);
  }
  ```

  ```python Python theme={null}
  import json
  import os
  import requests

  with requests.get(
      'https://app.gethuntd.com/api/v1/public/people/stream',
      params={'is_user': 'true'},
      headers={'X-API-Key': os.environ['HUNTD_API_KEY']},
      stream=True,  # required, or requests buffers the whole body
  ) as response:
      for line in response.iter_lines():
          if not line:
              continue
          person = json.loads(line)
          if 'error' in person:
              raise RuntimeError(person['error']['code'])  # truncated stream
          handle(person)
  ```
</RequestExample>

<ResponseExample>
  ```jsonl 200 (NDJSON) theme={null}
  {"id":"62381c7cc5fc496eff56fd60","firstName":"Ada","lastName":"Lovelace","email":"ada@acme.com","companyDomain":"acme.com","sources":["devin"],"discoveredAt":"2026-07-31T17:28:28.725Z"}
  {"id":"62381c7cc5fc496eff56fd61","firstName":"Grace","lastName":"Hopper","email":"grace@globex.com","companyDomain":"globex.com","sources":[],"discoveredAt":"2026-07-31T16:02:11.402Z"}
  ```

  ```jsonl 200 (truncated) theme={null}
  {"id":"62381c7cc5fc496eff56fd60","firstName":"Ada","lastName":"Lovelace","email":"ada@acme.com","companyDomain":"acme.com","sources":["devin"],"discoveredAt":"2026-07-31T17:28:28.725Z"}
  {"success":false,"error":{"code":"STREAM_FAILED","message":"Stream failed before completion."}}
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": {
      "code": "INVALID_API_KEY",
      "message": "API key is missing, invalid, or has been revoked."
    }
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": {
      "code": "SOURCE_NOT_ALLOWED",
      "message": "Your organization does not have access to source `gong`."
    }
  }
  ```
</ResponseExample>

## Overview

Returns **every** person matching your filters in a single response, as
[NDJSON](https://github.com/ndjson/ndjson-spec): one JSON object per line, each the same shape as
a `data[]` entry from [List People](/public-api/people). Use it for backfills and full exports.

The same [filters](/public-api/conventions#filtering) apply. Paging parameters (`page`, `limit`,
`skip_count`) are ignored. See [Streaming](/public-api/streaming) for when to stream rather than
page.

## Reading the Stream

<Warning>
  Use a **streaming line reader** (`curl -N`, Node `readline`, Python `iter_lines()`).
  `fetch().json()`, `requests.get().json()` and `Invoke-RestMethod` buffer the entire body into
  memory first, which defeats the point and can run out of memory on large exports.
</Warning>

Expect roughly 40 to 100 rows per second: a full backfill of tens of thousands of people takes
minutes, not seconds. The stream is not resumable, so a dropped connection means starting again.
For very large exports, stream one `discovered_from` / `discovered_to` window at a time.

## Mid-stream Errors

Once rows are flowing the HTTP status is already sent, so a failure can't be a status code.
Instead the **last line is an error object** and the connection closes:

```json theme={null}
{"success":false,"error":{"code":"STREAM_FAILED","message":"Stream failed before completion."}}
```

Treat a line with an `error` key as a **truncated result, not data**: discard or mark what you
collected as partial, then retry.

## Errors

Returned as a normal HTTP error, before any rows are sent:

| HTTP | Error Code | Description |
| - | - | - |
| 400 | `INVALID_PARAMETER` | A query parameter is malformed or out of range |
| 401 | `INVALID_API_KEY` | API key is missing, invalid, or has been revoked |
| 403 | `ENDPOINT_NOT_ON_PLAN` | Your plan doesn't include this endpoint (Agency keys) |
| 403 | `SUBSCRIPTION_INACTIVE` | Your workspace has no active subscription. Contact your account manager. |
| 403 | `SOURCE_NOT_ALLOWED` | Your organization doesn't have access to the requested `source` |
| 423 | `SOURCE_UNAVAILABLE` | The requested `source` is paused for maintenance. Retry later. |
| 429 | `RATE_LIMIT_EXCEEDED` | Over 60 requests per minute. Wait `Retry-After` seconds. |
| 500 | `INTERNAL_ERROR` | Something broke on our side. Safe to retry. |
| 503 | `ORG_KIND_UNAVAILABLE` | Your plan briefly couldn't be confirmed. Retry. |


## OpenAPI

````yaml api-reference/public-api.json GET /api/v1/public/people/stream
openapi: 3.0.3
info:
  title: Huntd Public API
  version: 1.0.0
  description: >-
    Read what Huntd tracks for your organization (enterprise plan), or check one
    email address against the products you track (Agency plan).
  contact:
    name: Huntd Support
    email: support@gethuntd.com
servers:
  - url: https://app.gethuntd.com
    description: Public API
security:
  - ApiKeyAuth: []
tags:
  - name: Public API
  - name: Email Check
paths:
  /api/v1/public/people/stream:
    get:
      tags:
        - Public API
      summary: Stream People
      description: >-
        Every matching person in one request, as NDJSON. Paging parameters are
        ignored.
      operationId: streamPeople
      parameters:
        - $ref: '#/components/parameters/discovered_days'
        - $ref: '#/components/parameters/discovered_from'
        - $ref: '#/components/parameters/discovered_to'
        - $ref: '#/components/parameters/source'
        - $ref: '#/components/parameters/is_user'
      responses:
        '200':
          description: >-
            NDJSON: one person object per line, the same shape as a `data[]`
            entry from the paginated endpoint. If the stream fails after it
            started, the last line is an error object instead: treat it as a
            truncated result.
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/Person'
              example:
                id: 62381c7cc5fc496eff56fd60
                firstName: Ada
                lastName: Lovelace
                email: ada@acme.com
                jobTitle: VP Engineering
                seniority: VP
                department: Engineering
                jobFunction: Engineering
                company: Acme
                companyDomain: acme.com
                companySize: 420
                industry: software,information technology & services
                location: San Francisco
                country: United States
                linkedinUrl: https://linkedin.com/in/example
                sources:
                  - devin
                discoveredAt: '2026-07-31T17:28:28.725Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenRows'
        '423':
          $ref: '#/components/responses/SourceUnavailable'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/PlanUnavailable'
components:
  parameters:
    discovered_days:
      name: discovered_days
      in: query
      required: false
      description: >-
        The last N UTC days, including today (`2` = today and yesterday).
        "Discovered" means when we last checked the row, not when it was
        confirmed. Can't be combined with `discovered_from` / `discovered_to`.
      schema:
        type: integer
        minimum: 1
        maximum: 366
    discovered_from:
      name: discovered_from
      in: query
      required: false
      description: Inclusive UTC start day, `YYYY-MM-DD`.
      schema:
        type: string
        format: date
        example: '2026-07-01'
    discovered_to:
      name: discovered_to
      in: query
      required: false
      description: Inclusive UTC end day, `YYYY-MM-DD`.
      schema:
        type: string
        format: date
        example: '2026-07-31'
    source:
      name: source
      in: query
      required: false
      description: Restrict to one source slug, as returned by List Sources.
      schema:
        type: string
        example: gong
    is_user:
      name: is_user
      in: query
      required: false
      description: >-
        `true`: confirmed users only. `false`: checked but not a user. `all`:
        both.
      schema:
        type: string
        enum:
          - all
          - 'true'
          - 'false'
        default: all
  schemas:
    Person:
      type: object
      description: A person Huntd tracks for your organization
      properties:
        id:
          type: string
          description: Stable identifier. Use it to deduplicate across pages and runs.
        firstName:
          type: string
          nullable: true
          description: First name.
        lastName:
          type: string
          nullable: true
          description: Last name.
        email:
          type: string
          nullable: true
          description: Email address.
        jobTitle:
          type: string
          nullable: true
          description: Job title as we observed it.
        seniority:
          type: string
          nullable: true
          description: Derived from the job title.
        department:
          type: string
          nullable: true
          description: Derived from the job title.
        jobFunction:
          type: string
          nullable: true
          description: Derived from the job title.
        company:
          type: string
          nullable: true
          description: Company display name.
        companyDomain:
          type: string
          nullable: true
          description: Normalized domain. Joins directly to `domain` on List Companies.
        companySize:
          type: integer
          nullable: true
          description: Employee count.
        industry:
          type: string
          nullable: true
          description: Comma-separated industry labels.
        location:
          type: string
          nullable: true
          description: Location as we observed it.
        country:
          type: string
          nullable: true
          description: Country.
        linkedinUrl:
          type: string
          nullable: true
          description: LinkedIn profile URL.
        sources:
          type: array
          items:
            type: string
          description: >-
            Source slugs this person is a confirmed user of. Empty means we
            checked and found no user account, not that they are untracked.
        discoveredAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            When we last checked this person (UTC). Always agrees with the date
            filter, so it is safe as an incremental-sync cursor.
      example:
        id: 62381c7cc5fc496eff56fd60
        firstName: Ada
        lastName: Lovelace
        email: ada@acme.com
        jobTitle: VP Engineering
        seniority: VP
        department: Engineering
        jobFunction: Engineering
        company: Acme
        companyDomain: acme.com
        companySize: 420
        industry: software,information technology & services
        location: San Francisco
        country: United States
        linkedinUrl: https://linkedin.com/in/example
        sources:
          - devin
        discoveredAt: '2026-07-31T17:28:28.725Z'
    ApiError:
      type: object
      description: Every error uses this envelope. Branch on `error.code`, not the message.
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - INVALID_PARAMETER
                - INVALID_BODY
                - INVALID_API_KEY
                - ENDPOINT_NOT_ON_PLAN
                - SOURCE_NOT_ALLOWED
                - SUBSCRIPTION_INACTIVE
                - JOB_NOT_FOUND
                - SOURCE_NOT_VERIFIABLE
                - SOURCE_UNAVAILABLE
                - RATE_LIMITED
                - RATE_LIMIT_EXCEEDED
                - QUOTA_EXCEEDED
                - STREAM_FAILED
                - INTERNAL_ERROR
                - ORG_KIND_UNAVAILABLE
            message:
              type: string
              description: Human-readable. May change.
  responses:
    BadRequest:
      description: A query parameter is malformed or out of range
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            limit:
              summary: limit over 1000
              value:
                success: false
                error:
                  code: INVALID_PARAMETER
                  message: '`limit` may not exceed 1000.'
            dates:
              summary: Both date styles given
              value:
                success: false
                error:
                  code: INVALID_PARAMETER
                  message: >-
                    Use either `discovered_days` or
                    `discovered_from`/`discovered_to`, not both.
    Unauthorized:
      description: API key is missing, malformed, unknown or revoked
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            success: false
            error:
              code: INVALID_API_KEY
              message: API key is missing, invalid, or has been revoked.
    ForbiddenRows:
      description: >-
        Not available on your plan, or no access to the requested source, or no
        active subscription
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            notOnPlan:
              summary: Agency key calling an enterprise endpoint
              value:
                success: false
                error:
                  code: ENDPOINT_NOT_ON_PLAN
                  message: >-
                    This endpoint is not available on your plan. Use POST
                    /verify to check an address.
            sourceNotAllowed:
              summary: No access to the requested source
              value:
                success: false
                error:
                  code: SOURCE_NOT_ALLOWED
                  message: Your organization does not have access to source `gong`.
            subscriptionInactive:
              summary: Workspace has no active subscription
              value:
                success: false
                error:
                  code: SUBSCRIPTION_INACTIVE
                  message: >-
                    This workspace doesn't have an active subscription. Please
                    contact your account manager to restore access.
    SourceUnavailable:
      description: The requested source is paused for maintenance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            success: false
            error:
              code: SOURCE_UNAVAILABLE
              message: Source `gong` is temporarily unavailable for maintenance.
    RateLimited:
      description: Over the API key's per-minute limit
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            success: false
            error:
              code: RATE_LIMIT_EXCEEDED
              message: Rate limit exceeded — 60 requests per minute. Retry in 23s.
      headers:
        Retry-After:
          description: Seconds to wait before the next request.
          schema:
            type: integer
    InternalError:
      description: Internal error. Safe to retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            success: false
            error:
              code: INTERNAL_ERROR
              message: Internal server error.
    PlanUnavailable:
      description: Your plan briefly could not be confirmed. Retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            success: false
            error:
              code: ORG_KIND_UNAVAILABLE
              message: >-
                Your organization's plan could not be checked. Please retry in a
                moment.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key in format: hntd_{id}_{secret}. Create one in Settings → API &
        webhooks. `Authorization: Bearer` is also accepted.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.