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

# List Task Files

> List raw result files generated by a task.

# List Task Files

Returns raw result files for a task.

## Endpoint

```http theme={null}
GET https://api.socq.ai/v1/tasks/{task_id}/files
```

## Response

```json theme={null}
{
  "code": 200,
  "data": {
    "task_id": "A1B2C3D4E5F6G7H8",
    "items": [
      {
        "file_type": "raw_jsonl",
        "public_url": "https://storage.socq.ai/agent-results/A1B2C3D4E5F6G7H8/raw_jsonl.jsonl.gz",
        "file_size": 552,
        "item_count": 1,
        "expires_at": null
      }
    ]
  }
}
```


## OpenAPI

````yaml api-manual/agent-api/agent-api.json GET /v1/tasks/{task_id}/files
openapi: 3.0.0
info:
  title: Agent API
  description: Asynchronous social data collection API
  version: 1.0.0
servers:
  - url: https://api.socq.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /v1/tasks/{task_id}/files:
    get:
      tags:
        - Agent API
      summary: List task files
      description: List raw result files for a task.
      operationId: listAgentTaskFiles
      parameters:
        - $ref: '#/components/parameters/TaskId'
      responses:
        '200':
          description: Task files
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    TaskId:
      name: task_id
      in: path
      required: true
      schema:
        type: string
        example: A1B2C3D4E5F6G7H8
      description: Task ID returned by the submit endpoint
  schemas:
    FileListResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          properties:
            task_id:
              type: string
            items:
              type: array
              items:
                $ref: '#/components/schemas/ResultFile'
    ResultFile:
      type: object
      properties:
        file_type:
          type: string
          example: raw_jsonl
        public_url:
          type: string
        file_size:
          type: integer
          nullable: true
        item_count:
          type: integer
        expires_at:
          type: string
          format: date-time
          nullable: true
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````