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

# Get scan results

> Retrieve the stored DarkRecon result payload by scan UUID.

# Get scan results

Returns the full stored result payload for a previous scan.

## What comes back

* Top-level metadata such as `scan_id`, `status`, `total_breaches`, and `created_at`.
* The original `keywords` array or the scanned `domain`.
* Optional `discovered_emails` for domain-driven scans.
* Optional `error_detail` when the stored scan ended in an error state.
* A `results` object keyed by breach database name.

## Result parsing notes

* Each breach source object contains `InfoLeak`, `NumOfResults`, and `Data`.
* `Data` is an array of raw records from that source. Field names vary across breach databases.
* Password-like values are masked in returned records.
* `total_breaches` counts breach sources, not the total number of records across all `Data` arrays.

## Error behavior

* `404`: the supplied `scan_id` does not exist.
* `403`: the API key could not be validated.
* `422`: request validation failed, such as a missing `X-API-Key` header or malformed path input.


## OpenAPI

````yaml openapi/darkrecon.json GET /scan/{scan_id}
openapi: 3.0.0
info:
  title: DarkRecon API
  description: >-
    API for scanning keywords or domains for breach data. Results are stored and
    retrievable via scan UUID.
  version: 2.2.0
servers:
  - url: https://darkrecon.1337807.xyz/
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /scan/{scan_id}:
    get:
      tags:
        - Scan
      summary: Get scan results by UUID
      description: >-
        Retrieve the full stored results of a previous scan. The response
        includes top-level scan metadata and a `results` object keyed by breach
        database name. Each breach entry contains `InfoLeak`, `NumOfResults`,
        and a `Data` array of source-specific records. Passwords are masked in
        returned records.
      operationId: getScan
      parameters:
        - name: scan_id
          in: path
          required: true
          description: The UUID returned from POST /scan
          schema:
            type: string
            format: uuid
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      responses:
        '200':
          description: Scan results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanResult'
              example:
                scan_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                keywords:
                  - user@example.com
                domain: null
                total_breaches: 3
                status: success
                created_at: '2026-03-30T10:30:00+00:00'
                results:
                  AlpineReplay:
                    InfoLeak: Description of the breach...
                    NumOfResults: 1
                    Data:
                      - Email: user@example.com
                        Password(bcrypt): $2****************************xC
                        FirstName: John
                        LastName: Doe
        '403':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: Could not validate API key
        '404':
          description: Scan not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: Scan not found
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: missing
                    loc:
                      - header
                      - x-api-key
                    msg: Field required
                    input: null
components:
  schemas:
    ScanResult:
      type: object
      description: Stored scan result returned by `GET /scan/{scan_id}`.
      properties:
        scan_id:
          type: string
          format: uuid
        keywords:
          type: array
          items:
            type: string
          description: The keywords that were scanned
        domain:
          type: string
          nullable: true
          description: Domain that was enumerated (if provided)
        total_breaches:
          type: integer
          description: Number of breach databases found
        status:
          type: string
          enum:
            - success
            - no_results
            - no_queries
            - error
          description: Final stored scan status
        created_at:
          type: string
          format: date-time
          description: When the stored scan record was created
        discovered_emails:
          type: array
          items:
            type: string
          description: Emails discovered from domain enumeration
        error_detail:
          type: string
          description: Error message if scan failed
        results:
          type: object
          description: >-
            Raw breach data keyed by database name. Each entry contains InfoLeak
            (description), NumOfResults (count), and Data (array of breach
            records). Passwords are masked.
          additionalProperties:
            type: object
            properties:
              InfoLeak:
                type: string
                description: Description of the breach
              NumOfResults:
                type: integer
                description: Number of records in this breach
              Data:
                type: array
                description: >-
                  Breach records — fields vary per database (Email, Password,
                  FirstName, LastName, BDay, AutoNumber, NickName, etc.)
                items:
                  type: object
                  additionalProperties:
                    type: string
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message
      required:
        - detail
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          description: List of validation issues returned by the API framework.
      required:
        - detail
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          description: Where the validation error occurred.
          items:
            oneOf:
              - type: string
              - type: integer
        msg:
          type: string
          description: Human-readable validation message.
        type:
          type: string
          description: Machine-readable validation error type.
        input:
          description: The offending input value when available.
      required:
        - loc
        - msg
        - type
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Create keys via the admin dashboard.

````