> ## 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
> - 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`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# List ad sets

> Ad Campaigns. Read only. Lists ad sets (ad groups on Google) with their targeting, bidding and optimization settings, optionally for one campaign. Returns the ad sets (Google ad groups) synced for the connection, optionally filtered by platform and campaignId. It reads the `ad_sets` table directly, independent of the `ads` rollup GET /apis/v1/ads/tree uses.

<!-- aisa-pricing:start -->
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->

## Request contract

* **Method and path:** GET /apis/v1/ads/ad-sets
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/ads/ad-sets`
* **connectionId:** query; required
* **adAccountId:** query; optional
* **campaignId:** query; optional
* **adSetId:** query; optional
* **platform:** query; optional
* **status:** query; optional
* **page:** query; optional
* **limit:** query; optional
* **live:** query; optional
* **Runtime facts:** fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09

[Complete OpenAPI definition](https://aisa.one/docs/reference-contracts/aisa-ads.json)

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

```json theme={null}
{
  "operationId": "get_aisa_ads_apis_v1_ads_ad_sets",
  "method": "GET",
  "path": "/apis/v1/ads/ad-sets",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
      "in": "query",
      "name": "connectionId",
      "required": true,
      "schema": {
        "pattern": "^adc_[0-9A-Za-z]+$",
        "type": "string"
      }
    },
    {
      "description": "Platform ad account id (Meta act_). Lists every synced ad set of that ad account; no campaignId needed.",
      "in": "query",
      "name": "adAccountId",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Platform campaign ID Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.",
      "in": "query",
      "name": "campaignId",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Platform ad set ID Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.",
      "in": "query",
      "name": "adSetId",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "platform",
      "required": false,
      "schema": {
        "enum": [
          "facebook",
          "instagram",
          "tiktok",
          "linkedin",
          "pinterest",
          "google",
          "twitter",
          "openai",
          "reddit",
          "meta",
          "x"
        ],
        "type": "string"
      }
    },
    {
      "description": "Filter by the ad set's stored `status`, the value each row returns. A live read does not change it. Rows whose `status` is null match no filter.",
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
        "enum": [
          "active",
          "paused",
          "pending_review",
          "rejected",
          "completed",
          "cancelled",
          "error"
        ],
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "page",
      "required": false,
      "schema": {
        "default": 1,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 500,
        "maximum": 500,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "description": "Read the on/off switches live from the platform instead of returning synced values. See \"Status freshness\" in the operation description.",
      "in": "query",
      "name": "live",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "x-aisa-pricing": {
    "description": "Ads operations are free. Ad spend is billed by the ad platform to the connected ad account, never by AIsa.",
    "kind": "no_customer_charge"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

A request reference price is not currently available; use a request quote where supported. 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.


## OpenAPI

````yaml reference-contracts/aisa-ads.json GET /apis/v1/ads/ad-sets
openapi: 3.1.0
info:
  description: ''
  title: AIsa Ads
  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: []
  x-aisa-document:
    facts_hash: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
    generator_version: '3'
    protocol_version: '1'
    schema_version: '1'
    composer_version: '27'
    response_pending: []
    document_hash: sha256:ba353f59e89e1ebabe0e301d8ef57d3cbfa6bb406a8c591ee9c3833d64b60520
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: aisa-ads
  x-aisa-catalogs:
    aisa-ads:
      title: AIsa Ads
      description: ''
      x-aisa-document:
        facts_hash: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: 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/ads/ad-sets:
    get:
      summary: List ad sets
      description: >-
        Ad Campaigns. Read only. Lists ad sets (ad groups on Google) with their
        targeting, bidding and optimization settings, optionally for one
        campaign. Returns the ad sets (Google ad groups) synced for the
        connection, optionally filtered by platform and campaignId. It reads the
        `ad_sets` table directly, independent of the `ads` rollup GET
        /apis/v1/ads/tree uses.


        <!-- aisa-pricing:start -->

        A request reference price is not currently available; use a request
        quote where supported. Account-specific pricing and final settlement may
        differ.

        <!-- aisa-pricing:end -->
      operationId: get_aisa_ads_apis_v1_ads_ad_sets
      parameters:
        - description: >-
            The ads connection (adc_...) the request runs on: one of yours, from
            GET /apis/v1/ads/connections. On a request with a JSON body it may
            be sent as a top-level body member instead.
          in: query
          name: connectionId
          required: true
          schema:
            pattern: ^adc_[0-9A-Za-z]+$
            type: string
        - description: >-
            Platform ad account id (Meta act_). Lists every synced ad set of
            that ad account; no campaignId needed.
          in: query
          name: adAccountId
          required: false
          schema:
            type: string
        - description: >-
            Platform campaign ID Must be yours: it is checked through the
            connection before the request is sent, and an id that is not yours
            answers not_found.
          in: query
          name: campaignId
          required: false
          schema:
            type: string
        - description: >-
            Platform ad set ID Must be yours: it is checked through the
            connection before the request is sent, and an id that is not yours
            answers not_found.
          in: query
          name: adSetId
          required: false
          schema:
            type: string
        - in: query
          name: platform
          required: false
          schema:
            enum:
              - facebook
              - instagram
              - tiktok
              - linkedin
              - pinterest
              - google
              - twitter
              - openai
              - reddit
              - meta
              - x
            type: string
        - description: >-
            Filter by the ad set's stored `status`, the value each row returns.
            A live read does not change it. Rows whose `status` is null match no
            filter.
          in: query
          name: status
          required: false
          schema:
            enum:
              - active
              - paused
              - pending_review
              - rejected
              - completed
              - cancelled
              - error
            type: string
        - in: query
          name: page
          required: false
          schema:
            default: 1
            minimum: 1
            type: integer
        - in: query
          name: limit
          required: false
          schema:
            default: 500
            maximum: 500
            minimum: 1
            type: integer
        - description: >-
            Read the on/off switches live from the platform instead of returning
            synced values. See "Status freshness" in the operation description.
          in: query
          name: live
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  adSets:
                    items:
                      properties:
                        adSetName:
                          type:
                            - string
                            - 'null'
                        bidAmount:
                          description: >-
                            Bid cap or cost target in whole units of `currency`,
                            as last synced. Null when the strategy has none
                            (automatic bidding, ROAS targets, a Google portfolio
                            strategy).
                          type:
                            - number
                            - 'null'
                        bidStrategy:
                          description: >-
                            The bid strategy as last synced, in Meta's
                            vocabulary (LOWEST_COST_WITHOUT_CAP,
                            LOWEST_COST_WITH_BID_CAP, COST_CAP,
                            LOWEST_COST_WITH_MIN_ROAS) on every platform that
                            has an equivalent.
                          type:
                            - string
                            - 'null'
                        billingEvent:
                          description: >-
                            The ad set's billing event as last synced, in the
                            platform's own enum: Meta `billing_event`, TikTok
                            `billing_event`, Pinterest `billable_event`, X
                            `pay_by`, OpenAI
                            `bidding_config.billing_event_type`.
                          type:
                            - string
                            - 'null'
                        budget:
                          properties:
                            amount:
                              type: number
                            daily:
                              description: >-
                                LinkedIn and X only. The daily budget (LinkedIn:
                                the campaign's `dailyBudget`; X: the line item's
                                `daily_budget_amount_local_micro`).
                              type: number
                            lifetime:
                              description: >-
                                LinkedIn and X only. The lifetime total
                                (LinkedIn: the campaign's `totalBudget`; X: the
                                line item's `total_budget_amount_local_micro`),
                                readable even when a daily budget is also set.
                              type: number
                            pacing:
                              description: >-
                                LinkedIn only. The campaign's `pacingStrategy`:
                                how fast LinkedIn may spend the budget.
                                Typically LINEAR or ACCELERATED; the list is
                                open.
                              type: string
                            type:
                              enum:
                                - daily
                                - lifetime
                              type: string
                          type:
                            - object
                            - 'null'
                        configReadAt:
                          description: >-
                            Only with `live=true`. When `nativeSettings` was
                            read from the platform. Null on every row whose
                            native settings were not read now (row past the cap,
                            failed read, or a platform without a native read).
                          format: date-time
                          type:
                            - string
                            - 'null'
                        connectionId:
                          description: The ads connection (adc_...) the object belongs to.
                          type:
                            - string
                            - 'null'
                        currency:
                          type:
                            - string
                            - 'null'
                        isExternal:
                          type:
                            - boolean
                            - 'null'
                        nativeSettings:
                          additionalProperties: true
                          description: >-
                            TikTok only, only with `live=true` and only on rows
                            read live. A fixed subset of TikTok's adgroup/get
                            record, not the whole record (snake_case, with
                            TikTok's own names, enums and values). A field
                            TikTok does not return is absent.
                          type: object
                        optimizationGoal:
                          description: >-
                            The ad set's optimization goal as last synced, in
                            the platform's own enum: Meta: `optimization_goal`
                            (for example OFFSITE_CONVERSIONS or LINK_CLICKS).
                            TikTok: `optimization_goal`.
                          type:
                            - string
                            - 'null'
                        platform:
                          type: string
                        platformAdAccountId:
                          type: string
                        platformAdSetId:
                          type: string
                        platformAdSetStatus:
                          description: >-
                            Raw platform ad set status. On TikTok the ad group's
                            own switch `operation_status` (ENABLE / DISABLE),
                            independent of its campaign. On Meta and Reddit the
                            ad set's `effective_status` (e.g. CAMPAIGN_PAUSED).
                          type:
                            - string
                            - 'null'
                        platformCampaignId:
                          type:
                            - string
                            - 'null'
                        platformCreatedAt:
                          format: date-time
                          type:
                            - string
                            - 'null'
                        promotedObject:
                          additionalProperties: true
                          description: >-
                            Meta only. The ad set's `promoted_object` verbatim
                            (snake_case, for example pixel_id +
                            custom_event_type, page_id, application_id), as last
                            synced from its most recent ad.
                          type:
                            - object
                            - 'null'
                        schedule:
                          description: >-
                            The ad set's own flight dates, as synced from the
                            platform. On LinkedIn this is the campaign's
                            `runSchedule`. Null when the platform reports none.
                          properties:
                            endDate:
                              description: Absent when the ad set runs until it is stopped.
                              format: date-time
                              type: string
                            startDate:
                              format: date-time
                              type: string
                          type:
                            - object
                            - 'null'
                        status:
                          description: >-
                            Stored ad set status (active, paused,
                            pending_review, rejected, completed, cancelled,
                            error), as last synced. The `status` filter matches
                            it.
                          type:
                            - string
                            - 'null'
                        statusReadAt:
                          description: >-
                            Only with `live=true`. When `platformAdSetStatus`
                            was read from the platform; null when this row was
                            not read live.
                          format: date-time
                          type:
                            - string
                            - 'null'
                        targeting:
                          additionalProperties: true
                          description: >-
                            The ad set's audience as the platform reported it at
                            the last sync, in the platform's own shape. Every
                            platform.
                          properties:
                            audienceExpansionEnabled:
                              description: >-
                                LinkedIn audience expansion: whether LinkedIn
                                may also serve to members similar to the
                                criteria.
                              type: boolean
                            exclude:
                              additionalProperties: true
                              description: >-
                                LinkedIn `targetingCriteria.exclude`, verbatim.
                                Absent when the campaign excludes nothing.
                              type: object
                            include:
                              additionalProperties: true
                              description: >-
                                LinkedIn `targetingCriteria.include`, verbatim
                                (an `and` of `or` facet clauses).
                              type: object
                            offsiteDeliveryEnabled:
                              description: >-
                                Whether the campaign may deliver on the LinkedIn
                                Audience Network, off LinkedIn itself.
                              type: boolean
                          type:
                            - object
                            - 'null'
                      type: object
                    type: array
                  pagination:
                    properties:
                      limit:
                        type: integer
                      page:
                        type: integer
                      pages:
                        type: integer
                      total:
                        type: integer
                    type: object
                type: object
          description: Ad sets
        default:
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type:
                          - string
                          - 'null'
                      details:
                        additionalProperties: {}
                        type:
                          - object
                          - 'null'
                      message:
                        type:
                          - string
                          - 'null'
                      param:
                        type:
                          - string
                          - 'null'
                      retryHint:
                        type:
                          - string
                          - 'null'
                      retryable:
                        type:
                          - boolean
                          - 'null'
                      type:
                        type:
                          - string
                          - 'null'
                    type:
                      - object
                      - 'null'
                type: object
          description: Error. The code field is stable; see the error catalog.
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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