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

# Get Bots

> Get identified bot logs with filters



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/profound/openapi.documented.yml post /v1/logs/raw/bots
openapi: 3.1.0
info:
  title: External API
  version: 6c43b49565a0c4e7cb023e22242cc3df28ee7153
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security: []
paths:
  /v1/logs/raw/bots:
    post:
      tags:
        - Agent Analytics
      summary: Get Bots
      description: Get identified bot logs with filters
      operationId: get_bots_v1_logs_raw_bots_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BotsQuery'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - items:
                      $ref: '#/components/schemas/LogVisitBot'
                    type: array
                    title: LogVisitBotList
                  - $ref: '#/components/schemas/Response'
                title: Response Get Bots V1 Logs Raw Bots Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      deprecated: true
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Profound from '@profoundai/client';

            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.logs.raw.bots({
              domain: 'domain',
              metrics: ['count'],
              start_date: '2019-12-27T18:11:19.117Z',
            });

            console.log(response);
        - lang: Python
          source: |-
            import os
            from datetime import datetime
            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),  # This is the default and can be omitted
            )
            response = client.logs.raw.bots(
                domain="domain",
                metrics=["count"],
                start_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
            )
            print(response)
components:
  schemas:
    BotsQuery:
      properties:
        date_interval:
          type: string
          enum:
            - hour
            - day
            - week
            - month
            - year
            - relative_week
          title: Date Interval
          description: Date interval for the report. (only used with date dimension)
          default: day
        dimensions:
          items:
            anyOf:
              - type: string
                enum:
                  - timestamp
                  - method
                  - host
                  - path
                  - status_code
                  - ip
                  - user_agent
                  - referer
                  - bytes_sent
                  - duration_ms
                  - query_params
              - type: string
                enum:
                  - bot_name
                  - bot_provider
                  - bot_types
          type: array
          title: Dimensions
          description: Dimensions to group the report by.
          default: []
        metrics:
          items:
            type: string
            const: count
          type: array
          title: Metrics
        order_by:
          additionalProperties:
            type: string
            enum:
              - asc
              - desc
          type: object
          title: Order By
          description: >-

            Custom ordering of the report results.


            The order is a record of key-value pairs where:

            - key is the field to order by, which can be a metric or dimension

            - value is the direction of the order, either 'asc' for ascending or
            'desc' for descending.


            When not specified, the default order is the first metric in the
            query descending.
                    
          default: {}
          examples:
            - date: asc
        pagination:
          $ref: '#/components/schemas/Pagination'
          description: Pagination settings for the report results.
        domain:
          type: string
          title: Domain
          description: Domain to query logs for.
        start_date:
          type: string
          format: date-time
          title: Start Date
          description: >-
            Start date for logs. Accepts: YYYY-MM-DD, YYYY-MM-DD HH:MM,
            YYYY-MM-DD HH:MM:SS, or full ISO timestamp.
        end_date:
          type: string
          format: date-time
          title: End Date
          description: >-
            End date for logs. Accepts same formats as start_date. Defaults to
            now if omitted.
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/BotNameFilter'
              - $ref: '#/components/schemas/BotProviderFilter'
              - $ref: '#/components/schemas/BotTypesFilter'
              - $ref: '#/components/schemas/MethodFilter'
              - $ref: '#/components/schemas/PathFilter'
              - $ref: '#/components/schemas/StatusCodeFilter'
              - $ref: '#/components/schemas/IpFilter'
              - $ref: '#/components/schemas/UserAgentFilter'
              - $ref: '#/components/schemas/RefererFilter'
              - $ref: '#/components/schemas/QueryParamsFilter'
            discriminator:
              propertyName: field
              mapping:
                bot_name:
                  $ref: '#/components/schemas/BotNameFilter'
                bot_provider:
                  $ref: '#/components/schemas/BotProviderFilter'
                bot_types:
                  $ref: '#/components/schemas/BotTypesFilter'
                ip:
                  $ref: '#/components/schemas/IpFilter'
                method:
                  $ref: '#/components/schemas/MethodFilter'
                path:
                  $ref: '#/components/schemas/PathFilter'
                query_params:
                  $ref: '#/components/schemas/QueryParamsFilter'
                referer:
                  $ref: '#/components/schemas/RefererFilter'
                status_code:
                  $ref: '#/components/schemas/StatusCodeFilter'
                user_agent:
                  $ref: '#/components/schemas/UserAgentFilter'
          type: array
          title: Filters
          description: List of filters to apply to the bots logs query.
      type: object
      required:
        - metrics
        - domain
        - start_date
      title: BotsQuery
    LogVisitBot:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        org_id:
          type: string
          format: uuid
          title: Org Id
        method:
          type: string
          title: Method
        host:
          type: string
          title: Host
        path:
          type: string
          title: Path
        status_code:
          type: integer
          title: Status Code
        ip:
          type: string
          title: Ip
        user_agent:
          type: string
          title: User Agent
        referer:
          type: string
          title: Referer
          default: ''
        bytes_sent:
          type: integer
          title: Bytes Sent
          default: 0
        duration_ms:
          type: integer
          title: Duration Ms
          default: 0
        query_params:
          additionalProperties:
            type: string
          type: object
          title: Query Params
        bot_name:
          type: string
          title: Bot Name
        bot_provider:
          type: string
          title: Bot Provider
        bot_types:
          items:
            type: string
            enum:
              - ai_assistant
              - ai_training
              - index
              - ai_agent
          type: array
          title: Bot Types
      type: object
      required:
        - timestamp
        - org_id
        - method
        - host
        - path
        - status_code
        - ip
        - user_agent
        - bot_name
        - bot_provider
        - bot_types
      title: LogVisitBot
      description: DB Model for a bot visit.
    Response:
      properties:
        info:
          $ref: '#/components/schemas/Info'
        data:
          items:
            $ref: '#/components/schemas/Result'
          type: array
          title: Data
      type: object
      required:
        - info
        - data
      title: Response
      description: Base response model for reports.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Pagination:
      properties:
        limit:
          type: integer
          maximum: 50000
          exclusiveMinimum: 0
          title: Limit
          description: >-
            Maximum number of results to return. Default is 10,000, maximum is
            50,000.
          default: 10000
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: Offset for the results. Used for pagination.
          default: 0
      type: object
      title: Pagination
      description: Offset-based pagination parameters.
    BotNameFilter:
      properties:
        field:
          type: string
          const: bot_name
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
              enum:
                - Amazonbot
                - ClaudeBot
                - Claude-User
                - Claude-SearchBot
                - Applebot
                - Applebot-Extended
                - Bytespider
                - DeepSeek
                - DuckAssistBot
                - DuckDuckBot
                - Googlebot
                - Googlebot-News
                - Googlebot-Video
                - Googlebot-Image
                - Google-Extended
                - Storebot-Google
                - Google-CloudVertexBot
                - meta-externalfetcher
                - meta-externalagent
                - bingbot
                - MicrosoftPreview
                - ChatGPT-User
                - GPTBot
                - OAI-SearchBot
                - OAI-Operator
                - PerplexityBot
                - Perplexity-User
                - Grok-PageBrowser
                - YouBot
                - OpenClaw
                - baiduspider
                - CCBot
                - ERNIEBot
                - Gemini-Fetch
                - YandexBot
                - PetalBot
                - MistralAI-User
                - Slurp
                - Gemini-Deep-Research
            - items:
                type: string
                enum:
                  - Amazonbot
                  - ClaudeBot
                  - Claude-User
                  - Claude-SearchBot
                  - Applebot
                  - Applebot-Extended
                  - Bytespider
                  - DeepSeek
                  - DuckAssistBot
                  - DuckDuckBot
                  - Googlebot
                  - Googlebot-News
                  - Googlebot-Video
                  - Googlebot-Image
                  - Google-Extended
                  - Storebot-Google
                  - Google-CloudVertexBot
                  - meta-externalfetcher
                  - meta-externalagent
                  - bingbot
                  - MicrosoftPreview
                  - ChatGPT-User
                  - GPTBot
                  - OAI-SearchBot
                  - OAI-Operator
                  - PerplexityBot
                  - Perplexity-User
                  - Grok-PageBrowser
                  - YouBot
                  - OpenClaw
                  - baiduspider
                  - CCBot
                  - ERNIEBot
                  - Gemini-Fetch
                  - YandexBot
                  - PetalBot
                  - MistralAI-User
                  - Slurp
                  - Gemini-Deep-Research
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: BotNameFilter
      description: Filter by bot name (user agent)
    BotProviderFilter:
      properties:
        field:
          type: string
          const: bot_provider
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
              enum:
                - openai
                - anthropic
                - chatgpt
                - deepseek
                - google
                - microsoft
                - perplexity
                - apple
                - bytedance
                - amazon
                - meta
                - duckduckgo
                - you
                - xai
                - grok
                - gemini
                - mistral
                - huawei
                - yandex
                - baidu
                - yahoo
                - commoncrawl
                - openclaw
            - items:
                type: string
                enum:
                  - openai
                  - anthropic
                  - chatgpt
                  - deepseek
                  - google
                  - microsoft
                  - perplexity
                  - apple
                  - bytedance
                  - amazon
                  - meta
                  - duckduckgo
                  - you
                  - xai
                  - grok
                  - gemini
                  - mistral
                  - huawei
                  - yandex
                  - baidu
                  - yahoo
                  - commoncrawl
                  - openclaw
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: BotProviderFilter
      description: Filter by bot provider
    BotTypesFilter:
      properties:
        field:
          type: string
          const: bot_types
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
              enum:
                - ai_assistant
                - ai_training
                - index
            - items:
                type: string
                enum:
                  - ai_assistant
                  - ai_training
                  - index
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: BotTypesFilter
      description: Filter by bot types (ai_assistant, ai_training, or index)
    MethodFilter:
      properties:
        field:
          type: string
          const: method
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: MethodFilter
      description: Filter by HTTP method
    PathFilter:
      properties:
        field:
          type: string
          const: path
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: PathFilter
      description: Filter by request path
    StatusCodeFilter:
      properties:
        field:
          type: string
          const: status_code
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
          title: Operator
        value:
          anyOf:
            - type: integer
            - items:
                type: integer
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: StatusCodeFilter
      description: Filter by HTTP status code
    IpFilter:
      properties:
        field:
          type: string
          const: ip
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: IpFilter
      description: Filter by IP address
    UserAgentFilter:
      properties:
        field:
          type: string
          const: user_agent
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: UserAgentFilter
      description: Filter by user agent
    RefererFilter:
      properties:
        field:
          type: string
          const: referer
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: RefererFilter
      description: Filter by referer
    QueryParamsFilter:
      properties:
        field:
          type: string
          const: query_params
          title: Field
        operator:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      type: object
      required:
        - field
        - operator
        - value
      title: QueryParamsFilter
      description: Filter by query parameters
    Info:
      properties:
        total_rows:
          type: integer
          title: Total Rows
        query:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Query
      type: object
      required:
        - total_rows
      title: Info
      description: Base model for report information.
    Result:
      properties:
        metrics:
          items:
            anyOf:
              - type: integer
              - type: number
          type: array
          title: Metrics
        dimensions:
          items:
            anyOf:
              - type: string
              - type: string
                format: uuid
          type: array
          title: Dimensions
      type: object
      required:
        - metrics
        - dimensions
      title: Result
      description: Base model for report results.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````