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

# Query Project Logs

> Query raw log data across all apps in a project (or specific apps).

Filters:
- app_slugs: Comma-separated app slugs (e.g., "api,worker")
- environment: Filter by environment name
- levels: Comma-separated log levels (e.g., "ERROR,WARNING")
- search: Search in message, logger_name, or attributes
- loggers: Comma-separated logger names
- since/until: ISO8601 timestamps for time range
- page/page_size: Pagination controls



## OpenAPI

````yaml https://api.apilens.ai/api/v1/openapi.json get /api/v1/projects/{project_slug}/data/logs
openapi: 3.1.0
info:
  title: APILens API
  version: 1.0.0
  description: API Observability Platform
servers: []
security: []
paths:
  /api/v1/projects/{project_slug}/data/logs:
    get:
      tags:
        - Projects
      summary: Query Project Logs
      description: |-
        Query raw log data across all apps in a project (or specific apps).

        Filters:
        - app_slugs: Comma-separated app slugs (e.g., "api,worker")
        - environment: Filter by environment name
        - levels: Comma-separated log levels (e.g., "ERROR,WARNING")
        - search: Search in message, logger_name, or attributes
        - loggers: Comma-separated logger names
        - since/until: ISO8601 timestamps for time range
        - page/page_size: Pagination controls
      operationId: api_projects_router_query_project_logs
      parameters:
        - in: path
          name: project_slug
          schema:
            title: Project Slug
            type: string
          required: true
        - in: query
          name: app_slugs
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: App Slugs
          required: false
        - in: query
          name: environment
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Environment
          required: false
        - in: query
          name: since
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Since
          required: false
        - in: query
          name: until
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Until
          required: false
        - in: query
          name: levels
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Levels
          required: false
        - in: query
          name: search
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
          required: false
        - in: query
          name: loggers
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Loggers
          required: false
        - in: query
          name: page
          schema:
            default: 1
            title: Page
            type: integer
          required: false
        - in: query
          name: page_size
          schema:
            default: 50
            title: Page Size
            type: integer
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsQueryResponse'
      security:
        - JWTBearer: []
components:
  schemas:
    LogsQueryResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/LogItemResponse'
          title: Items
          type: array
        total_count:
          title: Total Count
          type: integer
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
      required:
        - items
        - total_count
        - page
        - page_size
      title: LogsQueryResponse
      type: object
    LogItemResponse:
      properties:
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        app_id:
          title: App Id
          type: string
        environment:
          title: Environment
          type: string
        level:
          title: Level
          type: string
        message:
          title: Message
          type: string
        logger_name:
          title: Logger Name
          type: string
        payload:
          title: Payload
          type: string
        attributes:
          additionalProperties: true
          title: Attributes
          type: object
      required:
        - timestamp
        - app_id
        - environment
        - level
        - message
        - logger_name
        - payload
        - attributes
      title: LogItemResponse
      type: object
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer

````