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

# Get audience run trends for charts

> Returns chronological per-run metrics and run-over-run movement counts for completed runs.



## OpenAPI

````yaml https://api.aws53.cloud/openapi-intent.json get /v1/intent/audiences/{id}/trends
openapi: 3.1.0
info:
  title: Orbit API
  version: 1.0.0
  description: >-
    Orbit Audience Intent API: topic discovery, site analysis, curated ICP
    filters, saved audiences, materialization runs, stats, and CSV export.
    Discovery endpoints are public; audience management accepts either Bearer
    JWT or X-API-Key auth.
servers:
  - url: https://api.aws53.cloud
    description: Production
security: []
tags:
  - name: Topic Discovery
    description: Browse, search, and analyze available intent topics
  - name: Site Analysis
    description: Analyze a website URL to find matching intent topics
  - name: Site Topics
    description: Recent organization site-topic analyses
  - name: Audience Builder
    description: >-
      Curated filters, preview, saved audiences, runs, exports, webhooks, and
      managed destinations
paths:
  /v1/intent/audiences/{id}/trends:
    get:
      tags:
        - Audience Builder
      summary: Get audience run trends for charts
      description: >-
        Returns chronological per-run metrics and run-over-run movement counts
        for completed runs.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 30
          required: false
          name: limit
          in: query
      responses:
        '200':
          description: Audience run trends for charts
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/IntentAudienceTrends'
                  meta:
                    $ref: '#/components/schemas/ApiMeta'
                required:
                  - data
                  - meta
        '404':
          description: Audience not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    IntentAudienceTrends:
      type: object
      properties:
        audience:
          $ref: '#/components/schemas/IntentAudience'
        latestRun:
          anyOf:
            - $ref: '#/components/schemas/IntentAudienceRun'
            - type: 'null'
        state:
          type: string
          enum:
            - ready
            - no_completed_runs
        points:
          type: array
          items:
            $ref: '#/components/schemas/IntentAudienceTrendPoint'
    ApiMeta:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        request_id:
          type: string
      required:
        - timestamp
        - request_id
    ApiErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
        meta:
          $ref: '#/components/schemas/ApiMeta'
      required:
        - error
        - meta
    IntentAudience:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - draft
            - active
            - paused
        config:
          $ref: '#/components/schemas/IntentAudienceConfig'
        accessType:
          type: string
          enum:
            - paid
            - free_one_shot
        dailyRefreshEnabled:
          type: boolean
        audienceSize:
          type: integer
        createdBy:
          type:
            - string
            - 'null'
          format: uuid
        lastRefreshedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
        pausedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - organizationId
        - name
        - status
        - config
        - accessType
        - dailyRefreshEnabled
        - audienceSize
    IntentAudienceRun:
      type: object
      properties:
        id:
          type: string
          format: uuid
        audienceId:
          type: string
          format: uuid
        organizationId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - queued
            - running
            - completed
            - failed
            - cancelled
        runType:
          type: string
          enum:
            - manual
            - daily
            - preview
        configHash:
          type: string
        dataDate:
          type: string
          format: date
        resultKey:
          type: string
        candidateCount:
          type: integer
        resultCount:
          type: integer
        attempts:
          type: integer
        nextAttemptAt:
          type:
            - string
            - 'null'
          format: date-time
        idempotencyKey:
          type:
            - string
            - 'null'
        errorCode:
          type:
            - string
            - 'null'
        errorMessage:
          type:
            - string
            - 'null'
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        cancelledAt:
          type:
            - string
            - 'null'
          format: date-time
        readyEmailSentAt:
          type:
            - string
            - 'null'
          format: date-time
        readyEmailExportId:
          type:
            - string
            - 'null'
          format: uuid
        readyEmailError:
          type:
            - string
            - 'null'
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - audienceId
        - organizationId
        - status
        - runType
        - configHash
        - dataDate
        - resultKey
        - candidateCount
        - resultCount
        - attempts
    IntentAudienceTrendPoint:
      type: object
      properties:
        runId:
          type: string
          format: uuid
        resultKey:
          type: string
        runType:
          type: string
          enum:
            - manual
            - daily
            - preview
        dataDate:
          type: string
          format: date
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        resultCount:
          type: integer
        total:
          type: integer
        companyCount:
          type: integer
        highIntentCount:
          type: integer
        mediumIntentCount:
          type: integer
        lowIntentCount:
          type: integer
        averageIntentScore:
          type:
            - number
            - 'null'
        maxIntentScore:
          type:
            - number
            - 'null'
        averageTopicOverlap:
          type:
            - number
            - 'null'
        maxTopicOverlap:
          type:
            - number
            - 'null'
        businessEmailCount:
          type: integer
        businessEmailPercent:
          type: number
        anyEmailCount:
          type: integer
        anyEmailPercent:
          type: number
        anyPhoneCount:
          type: integer
        anyPhonePercent:
          type: number
        decisionMakerCount:
          type: integer
        decisionMakerPercent:
          type: number
        executiveCount:
          type: integer
        executivePercent:
          type: number
        movement:
          $ref: '#/components/schemas/IntentAudienceTrendMovement'
    ApiError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details: {}
      required:
        - code
        - message
    IntentAudienceConfig:
      type: object
      properties:
        topicIds:
          type: array
          items:
            type: integer
          minItems: 1
          maxItems: 250
        minScore:
          type: integer
          minimum: 0
          maximum: 99
          description: Accepted below 50, normalized/clamped to 50 by the backend.
        maxScore:
          type: integer
          minimum: 50
          maximum: 99
          default: 99
        minTopicOverlap:
          type: integer
          minimum: 1
          maximum: 250
          default: 1
        filters:
          type: object
          additionalProperties: true
        sourceUrl:
          type: string
          format: uri
        topics:
          type: array
          items:
            $ref: '#/components/schemas/IntentMatchedTopic'
          description: >-
            Hydrated topic metadata for display. Present on audience responses;
            write requests should continue sending topicIds.
      required:
        - topicIds
    IntentAudienceTrendMovement:
      type: object
      properties:
        hasPreviousRun:
          type: boolean
        previousRunId:
          type:
            - string
            - 'null'
          format: uuid
        newProfileCount:
          type: integer
        droppedProfileCount:
          type: integer
        retainedProfileCount:
          type: integer
        scoreIncreasedCount:
          type: integer
        scoreDecreasedCount:
          type: integer
        scoreUnchangedCount:
          type: integer
        highIntentEntrantCount:
          type: integer
        highIntentExitCount:
          type: integer
        topicOverlapIncreasedCount:
          type: integer
        topicOverlapDecreasedCount:
          type: integer
        topicOverlapUnchangedCount:
          type: integer
    IntentMatchedTopic:
      type: object
      properties:
        topicId:
          type: integer
        topicName:
          type: string
        type:
          type:
            - string
            - 'null'
        industry:
          type:
            - string
            - 'null'
        category:
          type:
            - string
            - 'null'
      required:
        - topicId
        - topicName
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Dashboard access token. Send as Authorization: Bearer <token>.'
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Organization API key (sk_...). Send as X-API-Key: <key>.'

````