---
title: "Search documents for a vehicle"
method: POST
path: "/v1/documents/search"
tags: ["documents"]
---

# Search documents for a vehicle

`POST /v1/documents/search`

## Request

- Base URL: `https://api.angellist.com`
- URL: `https://api.angellist.com/v1/documents/search`
- Auth: OAuth 2
  - Authorization code: `https://gateway.angellist.com/oauth/authorize`
  - Client credentials
  - Token URL: `https://gateway.angellist.com/oauth/token` scopes: `documents:read`

Search the documents of a single vehicle. `vehicle` is required and scopes the search; the caller must be authorized for it. Optional boolean predicate clauses (`must`/`should`/`must_not`) filter by `type`, `content_type`, `created` range, and free-text `q`. Backed by OpenSearch; results are eventually consistent (max staleness ~30s). Only executed investment documents are returned — see the `type` field for the surfaced categories.

## Request body

- DocumentSearchRequest: Search body. `vehicle` is required and scopes the search to one authorized vehicle. Optional predicate clauses filter within it.
  - `limit` integer: Maximum number of documents to return (1-100, default 25).
  - `must` SearchPredicate[]: Predicates a document must all match (AND).
    - `field` 'type' | 'content_type' | 'created' | 'q', required: Field to filter on. `type` and `content_type` use `eq`; `created` (unix seconds) uses `gt`/`gte`/`lt`/`lte`; `q` (free text over the file name) uses `contains`.
    - `op` 'eq' | 'contains' | 'gt' | 'gte' | 'lt' | 'lte', required
    - `value` string, required
  - `must_not` SearchPredicate[]: Predicates a document must not match (NOT).
    - `field` 'type' | 'content_type' | 'created' | 'q', required: Field to filter on. `type` and `content_type` use `eq`; `created` (unix seconds) uses `gt`/`gte`/`lt`/`lte`; `q` (free text over the file name) uses `contains`.
    - `op` 'eq' | 'contains' | 'gt' | 'gte' | 'lt' | 'lte', required
    - `value` string, required
  - `should` SearchPredicate[]: Predicates where at least one must match (OR).
    - `field` 'type' | 'content_type' | 'created' | 'q', required: Field to filter on. `type` and `content_type` use `eq`; `created` (unix seconds) uses `gt`/`gte`/`lt`/`lte`; `q` (free text over the file name) uses `contains`.
    - `op` 'eq' | 'contains' | 'gt' | 'gte' | 'lt' | 'lte', required
    - `value` string, required
  - `starting_after` string: Cursor for forward pagination (a doc_ id).
  - `vehicle` string, required: Public vehicle ID to scope the search to (required).

## Response `200`

Search results.

- DocumentSearchResult
  - `data` Document[], required
    - `content_type` string: MIME type.
    - `created` integer, required: Creation time, unix seconds.
    - `id` string, required
    - `livemode` boolean, required
    - `name` string, required: Original file name.
    - `object` 'document', required
    - `presigned_url` PresignedUrl: A short-lived presigned URL for a file's bytes, plus its expiry. Not stable — do not cache or persist it.
      - `expires_at` integer: When the URL expires, unix seconds. Absent until document-service reports it.
      - `url` string, uri, required: Presigned URL for the file's bytes.
    - `size` integer: File size in bytes.
    - `type` string: Document category (snake_case). One of a fixed set: stock_purchase_agreement, convertible_equity_agreement, safe, note, warrant, agreement_for_future_tokens, token_purchase_agreement, token_warrant, token_warrant_purchase_agreement, token_warrant_exercise_notice, financial_statements. Search results only contain executed investment documents; financial_statements appears only when following a `document_id` from `listFinancialStatements` through `getDocument`.
    - `vehicle` object, required
      - `id` string, required
  - `has_more` boolean, required
  - `next_cursor` string, nullable
  - `object` 'search_result', required

## Other responses

- `400`: The request was malformed or contained invalid parameters.
- `401`: Authentication required or token invalid.
- `403`: The authenticated user does not have permission to access this resource, or the vehicle's data is not available through the API. Vehicle-scoped financial-data endpoints return code `not_available` when a vehicle's data isn't served through the API yet — the API returns verified data or none, never partial data. One account can hold a mix of covered and uncovered vehicles; support for uncovered vehicles is on the roadmap and will be added in the coming months.
- `404`: Resource not found.
- `429`: Rate limit exceeded.
- `500`: An unexpected error occurred.

---

[API](https://skmtc.dev/angellist/apis/angellist-funds-api.md) - [All operations](https://skmtc.dev/angellist/apis/angellist-funds-api/llms.txt) - [OpenAPI document](https://skmtc.dev/angellist/apis/angellist-funds-api/revisions/b339e0e06c02?raw)
