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

# 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`](/docs/api-reference/foreplay/get_foreplay-getadsbybrandid) and `ad_library_id` into [`get_foreplay-brand-analytics`](/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: \$0.02625 per item returned in `data[]`; empty results and errors are not charged.** One credit per brand returned.

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


## OpenAPI

````yaml openapi/foreplay.json GET /foreplay/brand/getBrandsByDomain
openapi: 3.0.3
info:
  title: Foreplay API
  version: 1.0.0
  description: >-
    Foreplay ad creative intelligence routed through the AIsa gateway. Search a
    100M+ ad library, pull ads for known brands, resolve brands by domain, and
    get brand-level running-ads distribution and creative velocity analytics.
    All data endpoints are billed per item returned in `data[]` ($0.02625 /
    item); empty results and 4xx/5xx errors are not charged.
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /foreplay/brand/getBrandsByDomain:
    get:
      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`.


        Billed $0.02625 per item returned in `data[]` (1 credit per item); empty
        results and 4xx/5xx errors are not charged.
      operationId: get_brands_by_domain
      parameters:
        - name: domain
          in: query
          required: true
          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.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: >-
            Pagination limit (max 10). Controls the number of brands returned
            per request.
          schema:
            type: integer
            default: 10
            maximum: 10
        - name: order
          in: query
          required: false
          description: >-
            Order of results: 'most_ranked' (default) or 'least_ranked'. Sorts
            brands by relevance ranking.
          schema:
            type: string
            default: most_ranked
      responses:
        '200':
          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.
          content:
            application/json:
              schema:
                type: object
              example:
                metadata:
                  success: true
                  status_code: 200
                  count: 1
                  cursor: null
                data:
                  - brand_id: bYeKOahyGopmGKMHiWit
                    ad_library_id: '15087023444'
                    name: Nike
                error: null
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: AISA API Key

````