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

# List documents

> Returns document summaries with cursor-based pagination.

**Two query modes:**
- **Company query** — filter by `company_domain` or `company_id` to get documents related to a specific company (both *subject* and *connected* docs). Returns a flat list with no pagination. Each document includes a top-level `relation` field.
- **Global query** — omit company filters to search across all documents. Requires a `created_at` or `updated_at` date range of **14 days or less**. Returns paginated results. Each document includes a `companies` array with per-company `relation`.

**Pagination:** Use `page_after` / `page_before` cursors (document IDs) for forward and backward navigation. The special values `Start` and `End` are supported. Only applies to global queries.



## OpenAPI

````yaml GET /api/v1/documents/
openapi: 3.0.3
info:
  title: Sacra API
  version: 1.0.0
  description: >-
    The Sacra API currently supports querying News, Documents, Companies and
    Categories that enable you to use Sacra research within your own
    application.


    ## **Getting started guide**


    To start using the APIs, you need to:


    - Only available to **Platforms** and **Funds** tier members. (See
    [here](https://sacra.com/pricing/))
        
    - You must use a valid API Key to send requests to the API endpoints. You
    can generate your API key in the Api Keys section of your [Organization
    Settings](https://sacra.com/orgs/settings/general/).
        
    - The API returns request responses in JSON format. When an API request
    returns an error, it is sent in the JSON response as an error key.
        

    ## Authentication


    The Sacra API uses Tokens for authentication.


    You can generate a Sacra API Key/Token in the Api Keys section of your
    [Organization Settings](https://sacra.com/orgs/settings/general/).


    You must include an API Key/Token in each request to the Sacra API with the
    **Authorization** request header.


    ### Authentication error response


    If a Token is missing, malformed, or invalid, you will receive an HTTP 401
    Unauthorized response code.


    ### **Need some help?**


    In case you have questions, we will eventually provide tutorials and a FAQ
    page. But for now you can check out the
    [#developers](https://discord.gg/mTswyV8gg3) channel in our community
    [Discord](https://discord.gg/mTswyV8gg3), there’s a good chance our
    community has an answer for you.


    ## Authorization


    | **Key** | **Value** |

    | --- | --- |

    | Authorization | Token {{API_KEY}} |
servers:
  - url: https://sacra.com
    description: Production
security: []
tags:
  - name: Companies
  - name: Categories
  - name: Events
  - name: News
  - name: Documents
  - name: Filings
  - name: Embeds
  - name: Metrics
  - name: Funding (Legacy)
paths:
  /api/v1/documents/:
    get:
      tags:
        - Documents
      summary: List documents
      description: >-
        Returns document summaries with cursor-based pagination.


        **Two query modes:**

        - **Company query** — filter by `company_domain` or `company_id` to get
        documents related to a specific company (both *subject* and *connected*
        docs). Returns a flat list with no pagination. Each document includes a
        top-level `relation` field.

        - **Global query** — omit company filters to search across all
        documents. Requires a `created_at` or `updated_at` date range of **14
        days or less**. Returns paginated results. Each document includes a
        `companies` array with per-company `relation`.


        **Pagination:** Use `page_after` / `page_before` cursors (document IDs)
        for forward and backward navigation. The special values `Start` and
        `End` are supported. Only applies to global queries.
      operationId: documents_list
      parameters:
        - in: query
          name: company_domain
          schema:
            type: string
          description: Company domain to filter by (e.g. `stripe.com`).
        - in: query
          name: company_id
          schema:
            type: string
          description: Company ID to filter by.
        - in: query
          name: created_at_gte
          schema:
            type: string
          description: ISO 8601 lower bound for created_at (inclusive).
        - in: query
          name: created_at_lte
          schema:
            type: string
          description: ISO 8601 upper bound for created_at (inclusive).
        - in: query
          name: page_after
          schema:
            type: string
          description: Cursor ID for forward pagination. Cannot combine with `page_before`.
        - in: query
          name: page_before
          schema:
            type: string
          description: Cursor ID for backward pagination. Cannot combine with `page_after`.
        - in: query
          name: page_size
          schema:
            type: integer
          description: Items per page, 1-100. Default 30. Only for global queries.
        - in: query
          name: updated_at_gte
          schema:
            type: string
          description: >-
            ISO 8601 lower bound for updated_at (inclusive). Recommended for
            daily polling.
        - in: query
          name: updated_at_lte
          schema:
            type: string
          description: >-
            ISO 8601 upper bound for updated_at (inclusive). Recommended for
            daily polling.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsResponse'
              examples:
                GlobalQueryWithPagination:
                  value:
                    documents:
                      - id: 1835
                        slug: owner
                        title: Owner One-Pager
                        link: >-
                          https://sacra-pdfs.s3.us-east-2.amazonaws.com/owner.pdf
                        web_url: https://sacra.com/c/owner/
                        type: company
                        date: '2026-01-13'
                        published_at: '2026-01-13'
                        created_at: '2025-03-10T20:42:33.911Z'
                        updated_at: '2026-01-13T21:01:20.492Z'
                        preview_meta:
                          title: Owner
                          image: >-
                            https://images.prismic.io/sacra/Z89OKRsAHJWomTQV_owner_logo.jpeg?auto=format,compress
                          description: >-
                            Software suite for restaurants to manage online
                            ordering, websites, marketing, and loyalty
                        companies:
                          - id: 1486
                            domain: owner.com
                            relation: subject
                    pagination:
                      page_size: 30
                      current_page_items: 1
                      total_items: 1
                      next_link: null
                      prev_link: null
                      after_cursor: Start
                      before_cursor: null
                CompanyQueryNoPagination:
                  value:
                    documents:
                      - id: 487
                        slug: karim-atiyeh-ramp-expert-interview-card-issuing
                        title: >-
                          Karim Atiyeh, co-founder and CTO of Ramp, on the
                          future of the card issuing market
                        link: >-
                          https://sacra-pdfs.s3.us-east-2.amazonaws.com/karim-atiyeh-ramp-expert-interview-card-issuing.pdf
                        web_url: >-
                          https://sacra.com/d/karim-atiyeh-ramp-expert-interview-card-issuing/
                        type: interview
                        date: '2022-06-13'
                        published_at: '2022-06-13'
                        created_at: '2022-06-13T00:00:00Z'
                        updated_at: '2024-01-15T12:00:00Z'
                        preview_meta:
                          title: Karim Atiyeh, co-founder and CTO of Ramp
                          image: null
                          description: Sacra interview with Karim Atiyeh.
                        relation: subject
                MarketDocument:
                  value:
                    documents:
                      - id: 1920
                        slug: how-perplexity-hits-656m-arr
                        title: How Perplexity hits $656M ARR
                        link: >-
                          https://sacra-pdfs.s3.us-east-2.amazonaws.com/how-perplexity-hits-656m-arr.pdf
                        web_url: https://sacra.com/d/how-perplexity-hits-656m-arr/
                        type: market
                        date: '2025-02-20'
                        published_at: '2025-02-20'
                        created_at: '2025-02-20T18:30:00Z'
                        updated_at: '2025-02-21T12:00:00Z'
                        preview_meta:
                          title: How Perplexity hits $656M ARR
                          image: >-
                            https://images.prismic.io/sacra/Z7fOD57c43Q3gCes_perplexityRevenue-1-.png?auto=format,compress
                          description: >-
                            TL;DR: As competition intensifies between
                            Perplexity, foundation model companies, and Google,
                            Perplexity is betting on deepening prosumer habitual
                            use in key verticals like finance and shopping.
                        companies:
                          - id: 1370
                            domain: perplexity.ai
                            relation: subject
                    pagination:
                      page_size: 30
                      current_page_items: 1
                      total_items: 1
                      next_link: null
                      prev_link: null
                      after_cursor: Start
                      before_cursor: null
                  description: >-
                    Market research document in a global query. Shows the
                    document list item shape with companies array and
                    pagination.
          description: ''
        '400':
          content:
            text/plain:
              schema:
                type: string
                example: Global queries require a created_at or updated_at range
          description: Invalid parameters or date range constraint violation.
        '404':
          content:
            text/plain:
              schema:
                type: string
                example: Company not found.
          description: Company or cursor document not found.
      security:
        - SacraAPIAuthentication: []
components:
  schemas:
    DocumentsResponse:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentSummary'
        pagination:
          allOf:
            - $ref: '#/components/schemas/DocumentsPagination'
          description: Only present in global queries. Null when no results.
      required:
        - documents
    DocumentSummary:
      type: object
      properties:
        id:
          type: integer
        slug:
          type: string
        title:
          type: string
          nullable: true
        link:
          type: string
          nullable: true
          description: URL to the PDF on S3.
        web_url:
          type: string
          nullable: true
          description: URL to the document on sacra.com.
        type:
          type: string
          description: One of `market`, `company`, `interview`.
        date:
          type: string
          nullable: true
        published_at:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        preview_meta:
          $ref: '#/components/schemas/DocumentSummaryPreviewMeta'
        relation:
          type: string
          description: Present in company queries. Either `subject` or `connected`.
        companies:
          type: array
          items:
            $ref: '#/components/schemas/DocumentCompanyRef'
          description: >-
            Present in global queries. Lists all companies related to the
            document.
      required:
        - created_at
        - date
        - id
        - link
        - preview_meta
        - published_at
        - slug
        - title
        - type
        - updated_at
        - web_url
    DocumentsPagination:
      type: object
      properties:
        page_size:
          type: integer
        current_page_items:
          type: integer
        total_items:
          type: integer
        after_cursor:
          type: string
          nullable: true
        before_cursor:
          type: string
          nullable: true
        next_link:
          type: string
          nullable: true
        prev_link:
          type: string
          nullable: true
      required:
        - after_cursor
        - before_cursor
        - current_page_items
        - next_link
        - page_size
        - prev_link
        - total_items
    DocumentSummaryPreviewMeta:
      type: object
      properties:
        title:
          type: string
        image:
          type: string
          format: uri
          nullable: true
        description:
          type: string
          nullable: true
      required:
        - description
        - image
        - title
    DocumentCompanyRef:
      type: object
      properties:
        id:
          type: integer
        domain:
          type: string
        relation:
          type: string
          description: Either `subject` or `connected`.
      required:
        - domain
        - id
        - relation
  securitySchemes:
    SacraAPIAuthentication:
      type: apiKey
      in: header
      name: Authorization
      description: |-
        Authenticate using one of two formats:

        - **Organization/user token:** `Token <your-token>`
        - **Stytch JWT:** `Bearer <your-jwt>`

````