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

> ## Agent Instructions
> ## Agent Instructions (AIsa)
>
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Paid calls need approval first. Docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP discovery are free to read. Before any paid, dynamically priced, or high-cost call, state the exact scope, rate, and maximum USD exposure, then wait for a separate user message approving that scope and cap. A request to collect data is not approval; do not send unapproved probes. Full rule: https://aisa.one/docs/llms.txt

# Segments Analysis

> <!-- aisa-pricing:start -->
Usage-based billing; Default request estimate: $0.075 USD (not a fixed price). Declared unit rate: $0.075 USD per similarweb_credit. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->

## Request contract

* **Method and path:** GET /apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement
* **Request URL template:** [https://api.aisa.one/apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement](https://api.aisa.one/apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement)
* **country:** query; optional
* **end\_date:** query; required
* **format:** query; optional
* **granularity:** query; required
* **main\_domain\_only:** query; optional
* **metrics:** query; required
* **segment:** query; required
* **start\_date:** query; required
* **web\_source:** query; optional
* **Runtime facts:** 472d1bfda50ffcb36fea4b8745e9822da1d9f0225a1e0e220b661005b2d4b7b2

[Complete OpenAPI definition](https://aisa.one/docs/openapi/similarweb.json)

Effective request and pricing declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "get_similarweb_apis_v1_similarweb_segment_analysi_64e47c",
  "method": "GET",
  "path": "/apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "examples": {
        "default": {
          "value": "ww"
        },
        "minimal": {
          "value": "ww"
        }
      },
      "in": "query",
      "name": "country",
      "required": false,
      "schema": {
        "default": "ww",
        "description": "Worldwide data only; values are case-insensitive.",
        "enum": [
          "ww"
        ],
        "type": "string"
      }
    },
    {
      "examples": {
        "default": {
          "value": "2026-09"
        },
        "minimal": {
          "value": "2026-09"
        }
      },
      "in": "query",
      "name": "end_date",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "format",
      "required": false,
      "schema": {
        "enum": [
          "json"
        ],
        "type": "string"
      }
    },
    {
      "examples": {
        "default": {
          "value": "monthly"
        },
        "minimal": {
          "value": "monthly"
        }
      },
      "in": "query",
      "name": "granularity",
      "required": true,
      "schema": {
        "enum": [
          "monthly"
        ],
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "main_domain_only",
      "required": false,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "examples": {
        "default": {
          "value": "visits"
        },
        "minimal": {
          "value": "visits"
        }
      },
      "in": "query",
      "name": "metrics",
      "required": true,
      "schema": {
        "type": "string",
        "x-aisa-delimiter": ",",
        "x-aisa-maxItems": 8,
        "x-aisa-minItems": 1
      }
    },
    {
      "examples": {
        "default": {
          "value": "YOUR_SEGMENT_ID"
        },
        "minimal": {
          "value": "YOUR_SEGMENT_ID"
        }
      },
      "in": "query",
      "name": "segment",
      "required": true,
      "schema": {
        "description": "Replace YOUR_SEGMENT_ID with a real segment ID available to the configured Similarweb account. Obtain it from that account's Similarweb user/predefined segment metadata or ask your AIsa operator. This is an account-dependent template, not a ready-to-run or upstream-verified example.",
        "maxLength": 2048,
        "minLength": 1,
        "type": "string"
      }
    },
    {
      "examples": {
        "default": {
          "value": "2026-09"
        },
        "minimal": {
          "value": "2026-09"
        }
      },
      "in": "query",
      "name": "start_date",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "web_source",
      "required": false,
      "schema": {
        "enum": [
          "total"
        ],
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-pricing": {
    "cost_contract": "plan_units",
    "customer_multiplier": 1.0,
    "customer_pricing": "provider_cost_multiplier",
    "default_request_estimate_usd": 0.075,
    "estimate_source": "profile_seed",
    "evidence_source": "request_snapshot",
    "request_cost_drivers": {
      "kind": "plan_units",
      "formula": {
        "inputs": [
          "metrics",
          "periods"
        ],
        "input_multiplier": 1
      },
      "inputs": [
        {
          "name": "metrics",
          "kind": "array_length",
          "field": {
            "source": "query",
            "selector": "metrics"
          }
        },
        {
          "name": "periods",
          "kind": "calendar_buckets",
          "start": {
            "source": "query",
            "selector": "start_date"
          },
          "end": {
            "source": "query",
            "selector": "end_date"
          },
          "granularity": {
            "source": "query",
            "selector": "granularity"
          },
          "allowed_granularities": [
            "monthly"
          ],
          "min": 1,
          "max": 12
        }
      ]
    },
    "unit": "similarweb_credit",
    "unit_rate_usd": 0.075
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Usage-based billing; Default request estimate: $0.075 USD (not a fixed price). Declared unit rate: $0.075 USD per similarweb\_credit. Account-specific pricing and final settlement may differ.

Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.

* **Default request reference estimate (USD):** 0.075
* **Declared unit rate (USD):** 0.075
* **Billing unit:** similarweb\_credit
* **Cost contract:** plan\_units
* **Published reference multiplier:** 1.0
* **Settlement evidence source:** request\_snapshot

### Declared request billing units

* **Units:** (metrics × periods) × 1
* **metrics:** Number of entries in query.metrics, including repeated entries.
* **periods:** Inclusive periods from query.start\_date to query.end\_date; granularity: query.granularity. Daily: inclusive days; weekly: inclusive days / 7 rounded up; monthly: inclusive calendar months.
* **Allowed granularities:** \["monthly"]
* **Minimum:** 1
* **Maximum:** 12

### Request constraints and usage notes

* country supports ww only; default ww. State-level filtering is not supported.
* Replace YOUR\_SEGMENT\_ID with a real segment ID available to the configured Similarweb account. Obtain it from that account's Similarweb user/predefined segment metadata or ask your AIsa operator. This is an account-dependent template, not a ready-to-run or upstream-verified example. The reference metric visits is documented for monthly total traffic. Sources: [https://docs.similarweb.com/api-v5/api-reference/website-analysis-api/website-segments/segments](https://docs.similarweb.com/api-v5/api-reference/website-analysis-api/website-segments/segments) and [https://docs.similarweb.com/api-v5/guides/available-data](https://docs.similarweb.com/api-v5/guides/available-data)


## OpenAPI

````yaml openapi/similarweb.json GET /apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement
openapi: 3.1.0
info:
  description: ''
  title: SimilarWeb
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-configured-paths:
    - /apis/v1/similarweb/keyword-analysis/keywords/overview
    - /apis/v1/similarweb/search/keyword-competitors
    - /apis/v1/similarweb/search/landing-pages
    - /apis/v1/similarweb/search/serp-players-aggregated
    - /apis/v1/similarweb/search/serp-players-timeseries
    - /apis/v1/similarweb/search/website-keywords
    - /apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement
    - /apis/v1/similarweb/segment-analysis/segments/traffic-sources
    - /apis/v1/similarweb/website-analysis/websites/conversion-rates
    - /apis/v1/similarweb/website-analysis/websites/conversion-rates/aggregated
    - >-
      /apis/v1/similarweb/website-analysis/websites/traffic-by-demographics/aggregated
    - /apis/v1/similarweb/website-top-geographies
    - /apis/v1/similarweb/website-traffic-snapshot
    - /apis/v1/similarweb/website-traffic-trend
    - /apis/v1/similarweb/website/ad-networks
    - /apis/v1/similarweb/website/audience-interest
    - /apis/v1/similarweb/website/audience-overlap
    - /apis/v1/similarweb/website/deduplicated-audience
    - /apis/v1/similarweb/website/demographics
    - /apis/v1/similarweb/website/folders
    - /apis/v1/similarweb/website/marketing-channel-sources-legacy
    - /apis/v1/similarweb/website/popular-pages
    - /apis/v1/similarweb/website/ppc-spend
    - /apis/v1/similarweb/website/ranking
    - /apis/v1/similarweb/website/referrals
    - /apis/v1/similarweb/website/similar-sites
    - /apis/v1/similarweb/website/subdomains
    - /apis/v1/similarweb/website/technologies
    - /apis/v1/similarweb/website/top-sites-ranking
    - /apis/v1/similarweb/website/traffic-engagement
  x-aisa-document:
    facts_hash: 472d1bfda50ffcb36fea4b8745e9822da1d9f0225a1e0e220b661005b2d4b7b2
    generator_version: '3'
    protocol_version: '1'
    schema_version: '1'
    seed_month: 2026-09
    composer_version: '20'
    response_pending:
      - operation_id: get_similarweb_apis_v1_similarweb_keyword_analysi_490801
        path: /apis/v1/similarweb/keyword-analysis/keywords/overview
        method: GET
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: get_similarweb_apis_v1_similarweb_segment_analysi_6349fe
        path: /apis/v1/similarweb/segment-analysis/segments/traffic-sources
        method: GET
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: get_similarweb_apis_v1_similarweb_website_analysi_850464
        path: /apis/v1/similarweb/website-analysis/websites/conversion-rates
        method: GET
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: get_similarweb_apis_v1_similarweb_website_analysi_7399a9
        path: >-
          /apis/v1/similarweb/website-analysis/websites/conversion-rates/aggregated
        method: GET
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: get_similarweb_apis_v1_similarweb_website_analysi_aa2e1f
        path: >-
          /apis/v1/similarweb/website-analysis/websites/traffic-by-demographics/aggregated
        method: GET
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: similarwebFolders
        path: /apis/v1/similarweb/website/folders
        method: GET
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
    document_hash: sha256:70f238cd4e5363c574833d61ae1adf9a983516b7540e672b8d7499183d4e4181
  x-aisa-plans:
    builder: 1
    display_plan: similarweb_payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: similarweb
  x-aisa-catalogs:
    similarweb:
      title: SimilarWeb
      description: ''
      x-aisa-document:
        facts_hash: 472d1bfda50ffcb36fea4b8745e9822da1d9f0225a1e0e220b661005b2d4b7b2
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
        seed_month: 2026-09
      x-aisa-plans:
        builder: 1
        display_plan: similarweb_payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement:
    get:
      tags:
        - default
      summary: Segments Analysis
      description: >-
        <!-- aisa-pricing:start -->

        Usage-based billing; Default request estimate: $0.075 USD (not a fixed
        price). Declared unit rate: $0.075 USD per similarweb_credit.
        Account-specific pricing and final settlement may differ.

        <!-- aisa-pricing:end -->
      operationId: get_similarweb_apis_v1_similarweb_segment_analysi_64e47c
      parameters:
        - examples:
            default:
              value: ww
            minimal:
              value: ww
          in: query
          name: country
          required: false
          schema:
            default: ww
            description: Worldwide data only; values are case-insensitive.
            enum:
              - ww
            type: string
        - examples:
            default:
              value: 2026-09
            minimal:
              value: 2026-09
          in: query
          name: end_date
          required: true
          schema:
            type: string
        - in: query
          name: format
          required: false
          schema:
            enum:
              - json
            type: string
        - examples:
            default:
              value: monthly
            minimal:
              value: monthly
          in: query
          name: granularity
          required: true
          schema:
            enum:
              - monthly
            type: string
        - in: query
          name: main_domain_only
          required: false
          schema:
            type: boolean
        - examples:
            default:
              value: visits
            minimal:
              value: visits
          in: query
          name: metrics
          required: true
          schema:
            type: string
            x-aisa-delimiter: ','
            x-aisa-maxItems: 8
            x-aisa-minItems: 1
        - examples:
            default:
              value: YOUR_SEGMENT_ID
            minimal:
              value: YOUR_SEGMENT_ID
          in: query
          name: segment
          required: true
          schema:
            description: >-
              Replace YOUR_SEGMENT_ID with a real segment ID available to the
              configured Similarweb account. Obtain it from that account's
              Similarweb user/predefined segment metadata or ask your AIsa
              operator. This is an account-dependent template, not a
              ready-to-run or upstream-verified example.
            maxLength: 2048
            minLength: 1
            type: string
        - examples:
            default:
              value: 2026-09
            minimal:
              value: 2026-09
          in: query
          name: start_date
          required: true
          schema:
            type: string
        - in: query
          name: web_source
          required: false
          schema:
            enum:
              - total
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      request:
                        type: object
                        properties:
                          format:
                            type: string
                            description: Format in which the reply should be returned
                            enum:
                              - json
                              - xml
                          segment:
                            type: string
                            example: a4a9eadc-09ff-4f0b-beb2-40f7c5d07599
                            minLength: 1
                            description: Segment ID to analyze
                          granularity:
                            type: string
                            example: monthly
                            description: Time granularity for the returned values
                            enum:
                              - daily
                              - weekly
                              - monthly
                          country:
                            type:
                              - string
                              - 'null'
                            example: us
                            description: Two-letter country code (e.g., 'us', 'gb', 'ww')
                          start_date:
                            type:
                              - string
                              - 'null'
                            example: '2025-10-01'
                            format: date-time
                            description: >-
                              Start date in 'YYYY-MM' or 'YYYY-MM-DD' format or
                              relative keywords: latest, X_months_ago,
                              X_days_ago
                          end_date:
                            type:
                              - string
                              - 'null'
                            example: '2025-10-30'
                            format: date-time
                            description: >-
                              End date in 'YYYY-MM' or 'YYYY-MM-DD' format or
                              relative keywords: latest, X_months_ago,
                              X_days_ago
                          web_source:
                            type: string
                            description: The device/platform the traffic is coming from
                            enum:
                              - desktop
                              - mobile_web
                              - total
                          metrics:
                            type:
                              - array
                              - 'null'
                            description: >-
                              Comma-separated list of metrics: visits,
                              bounce_rate, page_views, average_visit_duration,
                              pages_per_visit, share, unique_visitors
                            items:
                              type: string
                              enum:
                                - visits
                                - bounce_rate
                                - page_views
                                - average_visit_duration
                                - pages_per_visit
                                - share
                                - unique_visitors
                          mtd:
                            type: boolean
                            description: >-
                              When 'true', end_date is set to the latest
                              available days' data (month-to-date). To use, set
                              granularity to 'daily'
                        required:
                          - segment
                      status:
                        type: string
                        enum:
                          - success
                          - error
                      error_code:
                        type:
                          - integer
                          - 'null'
                        example: '200'
                        format: int32
                      error_message:
                        type:
                          - string
                          - 'null'
                      last_updated:
                        type:
                          - string
                          - 'null'
                        example: '2025-10-30'
                        format: date-time
                      data_type:
                        type: string
                        enum:
                          - not_applicable
                          - estimated
                          - verified
                  data:
                    type:
                      - array
                      - 'null'
                    items:
                      type:
                        - object
                        - 'null'
                      properties:
                        date:
                          type: string
                          example: '2025-10-01'
                          format: date-time
                          description: >-
                            Date of the requested data in 'YYYY-MM' or
                            'YYYY-MM-DD' format
                        visits:
                          type:
                            - number
                            - 'null'
                          example: '2655.3025'
                          format: double
                          description: Estimated number of visits to the website
                        bounce_rate:
                          type:
                            - number
                            - 'null'
                          example: '0.15913776'
                          format: double
                          description: >-
                            Percentage of visits that view only one page on the
                            website
                        pages_per_visit:
                          type:
                            - number
                            - 'null'
                          example: '0.9947667'
                          format: double
                          description: Average number of pages viewed per visit
                        average_visit_duration:
                          type:
                            - number
                            - 'null'
                          format: double
                          description: Average time on website (in seconds)
                        page_views:
                          type:
                            - number
                            - 'null'
                          example: '2641.4065'
                          format: double
                          description: Estimated number of pages viewed on the website
                        share:
                          type:
                            - number
                            - 'null'
                          example: '0.014075259'
                          format: double
                          description: >-
                            Percentage of total site traffic that comes from
                            this segment
                        unique_visitors:
                          type:
                            - number
                            - 'null'
                          example: '1834.0046'
                          format: double
                          description: >-
                            Estimated number of unique visitors (not
                            deduplicated across devices) to the website
                        confidence:
                          type: string
                          enum:
                            - high
                            - low
                            - very_low
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
      x-codeSamples:
        - lang: text
          label: Reference example
          source: >-
            # Fixed reference example. Playground inputs do not update this
            sample.

            curl --request GET \
              --url 'https://api.aisa.one/apis/v1/similarweb/segment-analysis/segments/traffic-and-engagement?country=ww&end_date=2026-09&granularity=monthly&metrics=visits&segment=YOUR_SEGMENT_ID&start_date=2026-09' \
              --header 'Authorization: Bearer <token>'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.