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

# Preview

> Synchronously preview the first 25 matches and the total estimated count for a set of advanced lead search filters, without creating a Search or consuming credits.

Run the same filters as [`POST /leads/advanced_search`](/api-reference/endpoints/leads/advanced_search) and get back a synchronous **preview**: the total estimated profile count plus the first **25** matching leads. Use it to validate filters and size an audience before kicking off the real search.

## Overview

Compared to `POST /leads/advanced_search`, the preview:

* Does **not** create a `Search` record.
* Does **not** call your webhook.
* Does **not** consume credits.
* Does **not** require `webhook_url`.

The body accepts the exact same filter parameters as the regular advanced search — see [Search leads by filters](/api-reference/endpoints/leads/advanced_search) for the full reference. `webhook_url`, `name`, `limit`, `streaming`, `scale`, and `custom` are accepted but ignored: the response always contains up to 25 leads.

## Requirements

* A valid **integration** must be connected on the authenticated user.
* At least one filter or `keyword` must be provided.

## Rate Limits

* **1 request per second** per user.

## Response

`200 OK` — returns immediately with:

```json theme={null}
{
  "total_count": 1234,
  "preview": [
    {
      "full_name": "Ada Lovelace",
      "headline": "VP of Sales at Acme",
      "current_company": "Acme",
      "current_title": "VP of Sales",
      "linkedin_id": "104885158",
      "profile_url": "https://www.linkedin.com/in/urn:li:fs_salesProfile:(ACoAAAxxxx,NAME_SEARCH,abcde)"
    }
  ]
}
```

| Field         | Type             | Notes                                                                                |
| ------------- | ---------------- | ------------------------------------------------------------------------------------ |
| `total_count` | integer          | Total estimated number of leads matching the filters (not capped to 25).             |
| `preview`     | array of objects | Up to 25 matching leads. Each entry contains the fields listed above when available. |

## Errors

| Status                     | When                                                                                                                               |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `400 Bad Request`          | No filter or `keyword` provided.                                                                                                   |
| `401 Unauthorized`         | Invalid API key, or credentials missing/expired.                                                                                   |
| `403 Forbidden`            | API key does not have access to this endpoint.                                                                                     |
| `422 Unprocessable Entity` | Invalid filter shape, or enum ID outside the authorized list (e.g. unknown `functions`, `seniority_levels`, `company_size`, etc.). |
| `429 Too Many Requests`    | Per-user rate limit (1 req/s) or upstream LinkedIn rate limit.                                                                     |

## Example

```json theme={null}
{
  "job_titles": ["VP of Sales", "Chief Revenue Officer"],
  "seniority_levels": ["300", "310"],
  "functions": ["25"],
  "included_industries": ["96"],
  "included_locations": ["101452733"]
}
```


## OpenAPI

````yaml POST /leads/advanced_search/preview
openapi: 3.0.1
info:
  title: Pronto Accounts API
  description: Pronto Accounts API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.prontohq.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /leads/advanced_search/preview:
    post:
      summary: Preview
      description: >-
        Run the same filters as `POST /leads/advanced_search` and return a
        synchronous preview: the total estimated profile count plus the first 25
        matching leads. No `Search` is created, no webhook is called, and no
        credits are consumed.


        This is intended for UI previews, filter validation, and audience sizing
        before kicking off the real search.


        A valid integration is required on the authenticated account, and at
        least one filter (or `keyword`) **must** be provided. Unlike `POST
        /leads/advanced_search`, **`webhook_url` is not required**.


        **Rate limit:** 1 request per second per user.
      requestBody:
        description: >-
          Same filter parameters as `POST /leads/advanced_search`, including
          `live` (default `true`) to preview from Pronto's people database
          instead of LinkedIn Sales Navigator. `webhook_url`, `name`, `limit`,
          `streaming`, `scale`, and `custom` are accepted but ignored — the
          response is always the first 25 results.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                Accepts the same filter object as `POST /leads/advanced_search`.
                See that endpoint for the full list of supported filters.
              additionalProperties: true
            example:
              job_titles:
                - VP of Sales
                - Chief Revenue Officer
              seniority_levels:
                - '300'
                - '310'
              functions:
                - '25'
              included_industries:
                - '96'
              included_locations:
                - '101452733'
      responses:
        '200':
          description: Preview generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: >-
                      Estimated total number of leads matching the filters (not
                      capped to 25).
                  preview:
                    type: array
                    description: Up to 25 matching leads.
                    items:
                      type: object
                      properties:
                        full_name:
                          type: string
                          example: Ada Lovelace
                        headline:
                          type: string
                          example: VP of Sales at Acme
                        current_company:
                          type: string
                          example: Acme
                        current_title:
                          type: string
                          example: VP of Sales
                        linkedin_id:
                          type: string
                          description: >-
                            Numeric LinkedIn member id parsed from the profile
                            entity URN.
                          example: '104885158'
                        profile_url:
                          type: string
                          format: uri
                          example: >-
                            https://www.linkedin.com/in/urn:li:fs_salesProfile:(ACoAAAxxxx,NAME_SEARCH,abcde)
              example:
                total_count: 1234
                preview:
                  - full_name: Ada Lovelace
                    headline: VP of Sales at Acme
                    current_company: Acme
                    current_title: VP of Sales
                    linkedin_id: '104885158'
                    profile_url: >-
                      https://www.linkedin.com/in/urn:li:fs_salesProfile:(ACoAAAxxxx,NAME_SEARCH,abcde)
        '400':
          description: No filter or `keyword` provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Unauthorized — invalid API key, or credentials missing/expired on
            the user account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — API key does not have access to this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation error — a filter has the wrong shape, or contains an ID
            outside the authorized list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (1 request per second per user).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      description: Your API key
      name: X-API-KEY

````