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

# Batch Presigned URLs

> Generates temporary presigned URLs for multiple documents in a single request.

Filter documents by ticker, document type, and date ranges. Returns paginated results with presigned URLs and document metadata.

This is useful when you need to download multiple source documents at once, rather than calling the single-document presigned URL endpoint repeatedly.

Generate temporary presigned URLs for multiple documents in a single request. This is more efficient than calling the single-document endpoint repeatedly.

## Quick Start

```bash Basic Usage theme={null}
curl --request GET \
  --url 'https://api.linqalpha.com/v1/documents/batch_presigned_urls?tickers=AAPL&per_page=20' \
  --header 'X-API-KEY: <api-key>'
```

```bash Filter by Date Range theme={null}
curl --request GET \
  --url 'https://api.linqalpha.com/v1/documents/batch_presigned_urls?tickers=AAPL&calendar_period[start_time][year]=2025&calendar_period[start_time][month]=1&calendar_period[end_time][year]=2025&calendar_period[end_time][month]=12' \
  --header 'X-API-KEY: <api-key>'
```

```bash Multiple Tickers and Document Types theme={null}
curl --request GET \
  --url 'https://api.linqalpha.com/v1/documents/batch_presigned_urls?tickers=AAPL&tickers=MSFT&doc_sub_type=10-K&doc_sub_type=10-Q&per_page=50' \
  --header 'X-API-KEY: <api-key>'
```

<Note>
  Presigned URLs expire after approximately 1 hour. Generate new URLs when needed.
</Note>


## OpenAPI

````yaml GET /v1/documents/batch_presigned_urls
openapi: 3.0.1
info:
  title: LinqAlpha API
  description: >-
    Linq helps finance professionals make informed decisions using
    Retrieval-Augmented Generation (RAG)-enhanced answers. By leveraging
    cutting-edge Large Language Models (LLM) and supplementary technology, Linq
    provides the most optimized responses based on your queries.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.linqalpha.com
security:
  - ApiKeyAuth: []
tags:
  - name: Search
    description: Search and generate responses
  - name: Data
    description: Data retrieval and mapping
  - name: Feedback
    description: Conversation feedback
  - name: RMS
    description: Research Management System
  - name: Source Management
    description: Source batch and file management
  - name: MCP
    description: >-
      LinqAlpha MCP — Financial data tools for AI assistants via Model Context
      Protocol
  - name: Connectors
    description: Customer Connectors — customer-owned MCP connector management
  - name: Briefing
    description: Briefing Agent — automated market briefings with scheduling and delivery
  - name: Status
    description: Sync status — check organization, document, and container sync progress
paths:
  /v1/documents/batch_presigned_urls:
    get:
      tags:
        - Data
      summary: Batch Presigned URLs
      description: >-
        Generates temporary presigned URLs for multiple documents in a single
        request.


        Filter documents by ticker, document type, and date ranges. Returns
        paginated results with presigned URLs and document metadata.


        This is useful when you need to download multiple source documents at
        once, rather than calling the single-document presigned URL endpoint
        repeatedly.
      parameters:
        - name: tickers
          in: query
          description: >-
            Ticker symbol(s) to filter by. At least one ticker or stock_id is
            required. Use multiple `tickers` params for multiple tickers (e.g.,
            `?tickers=AAPL&tickers=MSFT`).
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: stock_ids
          in: query
          description: >-
            Stock ID(s) to filter by. Can be used instead of or together with
            `tickers`.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: doc_type
          in: query
          description: Document type filter (e.g., `filing`, `earnings_call`)
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: doc_sub_type
          in: query
          description: >-
            Document sub-type filter (e.g., `10-K`, `10-Q`, `annual_report`,
            `press_release`)
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: fiscal_period
          in: query
          description: >-
            Fiscal period filter. Use nested object notation in the query string
            (e.g.,
            `fiscal_period[start_time][year]=2024&fiscal_period[start_time][quarter]=1`).
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              start_time:
                type: object
                properties:
                  year:
                    type: integer
                    description: Fiscal period start year
                    example: 2023
                  quarter:
                    type: integer
                    description: Fiscal period start quarter (1-4)
                    minimum: 1
                    maximum: 4
                    example: 1
              end_time:
                type: object
                properties:
                  year:
                    type: integer
                    description: Fiscal period end year
                    example: 2024
                  quarter:
                    type: integer
                    description: Fiscal period end quarter (1-4)
                    minimum: 1
                    maximum: 4
                    example: 4
        - name: calendar_period
          in: query
          description: >-
            Calendar period filter. Use nested object notation in the query
            string (e.g.,
            `calendar_period[start_time][year]=2025&calendar_period[start_time][month]=1`).
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              start_time:
                type: object
                properties:
                  year:
                    type: integer
                    description: Calendar period start year
                    example: 2025
                  month:
                    type: integer
                    description: Calendar period start month (1-12)
                    minimum: 1
                    maximum: 12
                    example: 1
                  day:
                    type: integer
                    description: Calendar period start day (1-31, optional — defaults to 1)
                    minimum: 1
                    maximum: 31
                    example: 1
              end_time:
                type: object
                properties:
                  year:
                    type: integer
                    description: Calendar period end year
                    example: 2025
                  month:
                    type: integer
                    description: Calendar period end month (1-12)
                    minimum: 1
                    maximum: 12
                    example: 12
                  day:
                    type: integer
                    description: Calendar period end day (1-31, optional — defaults to 1)
                    minimum: 1
                    maximum: 31
                    example: 31
        - name: page
          in: query
          description: 'Page number (default: 1)'
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          description: 'Number of results per page (default: 20, max: 200)'
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 20
      responses:
        '200':
          description: Batch presigned URLs with document metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    nullable: true
                  payload:
                    type: object
                    properties:
                      documents:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Document ID
                            ticker:
                              type: string
                              nullable: true
                              description: Ticker symbol
                            doc_type:
                              type: string
                              nullable: true
                              description: Document type (e.g., filing, earnings_call)
                            doc_sub_type:
                              type: string
                              nullable: true
                              description: Document sub-type (e.g., 10-K, press_release)
                            name:
                              type: string
                              nullable: true
                              description: Document name
                            fiscal_date:
                              type: string
                              format: date
                              nullable: true
                              description: Fiscal period end date
                            calendar_date:
                              type: string
                              format: date
                              nullable: true
                              description: Calendar date
                            published_at:
                              type: string
                              format: date-time
                              nullable: true
                              description: Publication date
                            presigned_url:
                              type: string
                              description: Temporary presigned URL for document access
                      total_count:
                        type: integer
                        description: Total number of matching documents
                      page:
                        type: integer
                        description: Current page number
                      per_page:
                        type: integer
                        description: Results per page
                      has_more:
                        type: boolean
                        description: Whether there are more pages
                      skipped_count:
                        type: integer
                        description: Number of documents without downloadable files
              example:
                error: null
                payload:
                  documents:
                    - id: 123e4567-e89b-12d3-a456-426614174000
                      ticker: AAPL
                      doc_type: filing
                      doc_sub_type: 10-K
                      name: Q4 2024 Apple Inc.
                      fiscal_date: '2024-12-31'
                      calendar_date: '2025-01-30'
                      published_at: '2025-01-30T16:00:00Z'
                      presigned_url: https://linq-vertex-documents.s3.amazonaws.com/...
                  total_count: 42
                  page: 1
                  per_page: 20
                  has_more: false
                  skipped_count: 3
        '400':
          description: Bad Request - Missing ticker parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                error:
                  code: TICKERS_MISSING
                  msg: ticker query parameter is required
                  message: ticker query parameter is required
                payload: null
        '401':
          description: Unauthorized - Invalid API key or authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                error:
                  code: API_KEY_MISSING
                  msg: header does not contain api key
                  message: header does not contain api key
                payload: null
components:
  schemas:
    ApiErrorResponse:
      type: object
      description: Standard error response wrapper
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
        payload:
          description: Always null for error responses
          nullable: true
      required:
        - error
        - payload
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: >-
            Error code indicating the type of error. Common codes:

            - Authentication: `API_KEY_MISSING`, `INVALID_API_KEY`

            - Validation: `INVALID_REQUEST_BODY`, `ORGANIZATION_ID_MISSING`,
            `TICKERS_MISSING`, `CHAT_MESSAGE_ID_MISSING`, `DOCUMENT_ID_MISSING`

            - Service: `SEARCH_FAIL`, `TTS_FAIL`, `CREATE_CONV_FAIL`,
            `GET_STOCK_FAIL`, `CREATE_MSG_FAIL`, `ALPHA_COMP_FAIL`,
            `GET_REF_FAIL`

            - Connectors: `CONNECTOR_LIST_FAIL`, `CONNECTOR_NOT_FOUND`,
            `CONNECTOR_CREATE_FAIL`, `CONNECTOR_UPDATE_FAIL`,
            `CONNECTOR_DELETE_FAIL`, `CONNECTOR_TEST_FAIL`

            - Not Found: `NOT_FOUND`
          example: INVALID_REQUEST_BODY
        msg:
          type: string
          description: Error message (deprecated, use `message` instead)
          example: query is required and must be a string
        message:
          type: string
          description: Error message providing more details about the error
          example: query is required and must be a string
      required:
        - code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````