> ## 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

# Get Brands By Domain

> Discover brands advertising from a given domain; returns brand_id and ad_library_id for downstream calls.

Discover brands that advertise from a given `domain`. This is a discovery lookup — you do not need to already track the brands. Each brand record in `data[]` includes the Foreplay `brand_id` and the `ad_library_id` (page\_id). Feed `brand_id` into [`get_foreplay-getadsbybrandid`](https://aisa.one/docs/api-reference/foreplay/get_foreplay-getadsbybrandid) and `ad_library_id` into [`get_foreplay-brand-analytics`](https://aisa.one/docs/api-reference/foreplay/get_foreplay-brand-analytics). `limit` max is 10.

Example: `GET /foreplay/brand/getBrandsByDomain?domain=nike.com` returns Nike with `brand_id: "bYeKOahyGopmGKMHiWit"` and `ad_library_id: "15087023444"`.

**Billing: per item returned in `data[]`; empty results and errors are not charged.** Current prices are on [aisa.one/api](https://aisa.one/api).

Related: [`get_foreplay-getadsbybrandid`](https://aisa.one/docs/api-reference/foreplay/get_foreplay-getadsbybrandid), [`get_foreplay-brand-analytics`](https://aisa.one/docs/api-reference/foreplay/get_foreplay-brand-analytics), [`get_foreplay-discovery-ads`](https://aisa.one/docs/api-reference/foreplay/get_foreplay-discovery-ads).

## Request contract

* **Method and path:** GET /apis/v1/foreplay/brand/getBrandsByDomain
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain`
* **domain:** query; required
* **limit:** query; optional
* **order:** query; optional

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

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "get_brands_by_domain",
  "method": "GET",
  "path": "/apis/v1/foreplay/brand/getBrandsByDomain",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Domain name to search for. This can be a full URL (e.g., 'https://example.com') or just the domain (e.g., 'example.com'). The system will automatically format and clean the domain. This endpoint looks up candidate brands based on the provided domain. The returned brands are potential matches and are not guaranteed to be definitively associated with the domain.",
      "in": "query",
      "name": "domain",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Pagination limit (max 10). Controls the number of brands returned per request.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 10,
        "maximum": 10,
        "type": "integer"
      }
    },
    {
      "description": "Order of results: 'most_ranked' (default) or 'least_ranked'. Sorts brands by relevance ranking.",
      "in": "query",
      "name": "order",
      "required": false,
      "schema": {
        "default": "most_ranked",
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Charged for the actual billable results. Default request estimate: \$0.875 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/foreplay.json GET /apis/v1/foreplay/brand/getBrandsByDomain
openapi: 3.1.0
info:
  description: ''
  title: foreplay
  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-catalogs:
    foreplay:
      description: ''
      title: foreplay
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 799c2645862e25f3076e45d5e7d545772f57444689dd138cd88f92c37554b81c
        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-configured-paths:
    - /apis/v1/foreplay/brand/analytics
    - /apis/v1/foreplay/brand/getAdsByBrandId
    - /apis/v1/foreplay/brand/getBrandsByDomain
    - /apis/v1/foreplay/discovery/ads
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:d55108e3b852bff8ee0bab15feb77cca407b5c6493874d49a853676a8d5097d8
    facts_hash: 799c2645862e25f3076e45d5e7d545772f57444689dd138cd88f92c37554b81c
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: foreplay
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/foreplay/brand/getBrandsByDomain:
    get:
      tags:
        - foreplay
      summary: Get Brands By Domain
      description: >-
        Discover brands that advertise from a given domain. Returns brand
        records including the Foreplay `brand_id` and the `ad_library_id`
        (page_id). Use the returned `ad_library_id` as the `id` input to
        `brand/analytics`.

         empty results and 4xx/5xx errors are not charged.
      operationId: get_brands_by_domain
      parameters:
        - description: >-
            Domain name to search for. This can be a full URL (e.g.,
            'https://example.com') or just the domain (e.g., 'example.com'). The
            system will automatically format and clean the domain. This endpoint
            looks up candidate brands based on the provided domain. The returned
            brands are potential matches and are not guaranteed to be
            definitively associated with the domain.
          in: query
          name: domain
          required: true
          schema:
            type: string
        - description: >-
            Pagination limit (max 10). Controls the number of brands returned
            per request.
          in: query
          name: limit
          required: false
          schema:
            default: 10
            maximum: 10
            type: integer
        - description: >-
            Order of results: 'most_ranked' (default) or 'least_ranked'. Sorts
            brands by relevance ranking.
          in: query
          name: order
          required: false
          schema:
            default: most_ranked
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - ad_library_id: '15087023444'
                    brand_id: bYeKOahyGopmGKMHiWit
                    name: Nike
                error: null
                metadata:
                  count: 1
                  cursor: null
                  status_code: 200
                  success: true
              schema:
                type: object
          description: >-
            JSON envelope with `metadata` and a `data[]` array of brand objects
            (each includes `brand_id` and `ad_library_id`). Each brand in
            `data[]` counts as one billed item.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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