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

# Start source analysis (may create a crawl run)

> Required permission: sources:discover and runs:write.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/sources/discover/analyses
openapi: 3.0.3
info:
  title: Bulkgrid API
  version: 0.1.0
  description: >-
    Search indexed content, create crawl and extraction runs, and retrieve
    results. API keys require the scopes listed for each operation. OAuth
    connections grant MCP and search access only.
servers:
  - url: https://bulkgrid.com
    description: Bulkgrid
security:
  - apiKeyAuth: []
  - bearerAuth: []
tags:
  - name: Sources
    description: Source discovery, subscriptions, and indexing
  - name: Collections
    description: Collections and content selection rules
  - name: Search
    description: Search endpoints
  - name: Runs
    description: Run creation and lifecycle endpoints
  - name: Results
    description: Run result retrieval endpoints
paths:
  /api/v1/sources/discover/analyses:
    post:
      tags:
        - Sources
      summary: Start source analysis (may create a crawl run)
      description: 'Required permission: sources:discover and runs:write.'
      operationId: analyzeSource
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  minLength: 1
                sourceId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - url
      responses:
        '202':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  urlCount:
                    nullable: true
                    type: number
                  paths:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        depth:
                          type: number
                        count:
                          type: number
                        parent:
                          nullable: true
                          type: string
                        name:
                          type: string
                      required:
                        - path
                        - depth
                        - count
                        - parent
                        - name
                      additionalProperties: false
                  levelSummaries:
                    type: array
                    items:
                      type: object
                      properties:
                        parent:
                          type: string
                        total:
                          type: number
                        shown:
                          type: number
                      required:
                        - parent
                        - total
                        - shown
                      additionalProperties: false
                  warning:
                    nullable: true
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - sitemap_incomplete
                      message:
                        type: string
                    required:
                      - type
                      - message
                    additionalProperties: false
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  runId:
                    nullable: true
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  sourceId:
                    nullable: true
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  status:
                    type: string
                    enum:
                      - crawling
                      - analyzing
                      - completed
                      - partial
                      - failed
                  scopeUrls:
                    type: array
                    items:
                      type: string
                  error:
                    nullable: true
                    type: string
                  analyzedAt:
                    nullable: true
                    type: string
                required:
                  - url
                  - urlCount
                  - paths
                  - levelSummaries
                  - warning
                  - id
                  - runId
                  - sourceId
                  - status
                  - scopeUrls
                  - error
                  - analyzedAt
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Bulkgrid API key
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bulkgrid API key or OAuth access token. OAuth grants currently allow
        search:query and mcp:use only.

````