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

# Transaction API

> Turn payment transactions into merchant data. Authenticate with an API key sent as `Authorization: Bearer <key>`, or pay for the single request with x402 or MPP: https://docs.brandfetch.com/agents/pay-per-request.



## OpenAPI

````yaml POST /v2/brands/transaction
openapi: 3.0.1
info:
  title: Brandfetch API
  description: >-
    Our APIs help you personalize your customer journey through unique branded
    experiences.
  license:
    name: MIT
  version: 1.0.0
  contact:
    name: Brandfetch Support
    url: https://brandfetch.com
    email: support@brandfetch.io
servers:
  - url: https://api.brandfetch.io
security: []
paths:
  /v2/brands/transaction:
    post:
      tags:
        - brands
      summary: Get brand data from a transaction
      description: >-
        Turn payment transactions into merchant data. Authenticate with an API
        key sent as `Authorization: Bearer <key>`, or pay for the single request
        with x402 or MPP: https://docs.brandfetch.com/agents/pay-per-request.
      operationId: getBrandFromTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transactionLabel:
                  type: string
                  description: The raw transaction text.
                  example: STARBUCKS 1523 OMAHA NE
                countryCode:
                  type: string
                  description: >-
                    An ISO 3166-1 alpha-2 country code indicating the country
                    where the transaction took place.
                  example: US
              required:
                - transactionLabel
                - countryCode
      responses:
        '200':
          headers:
            PAYMENT-RESPONSE:
              description: >-
                Present on responses paid with x402: the base64-encoded
                settlement receipt (`success`, `transaction`, `network`,
                `payer`).
              schema:
                type: string
            Payment-Receipt:
              description: >-
                Present on responses paid with MPP: the base64url-encoded
                receipt (`method`, `reference`, `status`, `timestamp`). Such
                responses also carry `Cache-Control: private`.
              schema:
                type: string
          description: >-
            Successful request. A request paid with MPP whose response was lost
            can be retried with the same credential and the same body for two
            minutes: it is served from the payment already taken and not charged
            again. The credential pays for that transaction only: presented with
            another `transactionLabel` or `countryCode`, it is refused with a
            `402` whose `reason` is `credential_spent`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandResponse'
        '400':
          description: >-
            Either the request body was malformed (a missing or empty
            `transactionLabel` or `countryCode`, in which case the message
            identifies the offending field), or the descriptor was well-formed
            but could not be confidently matched to a merchant, in which case
            the message is `Failed to enrich transaction`. Retrying does not
            change the second case, so fall back to showing the raw descriptor.
            For a temporary failure on our side, which is worth retrying, see
            `503`. Neither case is charged: it consumes no API credit, and a
            payment presented with it is not settled. A malformed body is
            answered `400` whatever credential the request carries, and a
            request without a credential is quoted a price only once its body is
            complete.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Failed to enrich transaction
        '401':
          description: >-
            Unauthorized. Returned when the `Authorization` header is present
            but malformed. A request with no credential at all receives a `402`
            with a payment challenge instead.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Unauthorized
        '402':
          description: >-
            Payment required. Returned when the request carries no credential:
            no API key, no x402 payment, no MPP credential. The
            `PAYMENT-REQUIRED` header prices this request at $0.10 in USDC on
            Base, and each `WWW-Authenticate: Payment` challenge quotes the same
            price over MPP. Pay either way, or send an API key. Also returned,
            with a `reason`, when a `PAYMENT-SIGNATURE` or an `Authorization:
            Payment …` credential was presented but the payment was not accepted
            or could not be settled. Nothing is charged in that case. See
            https://docs.brandfetch.com/agents/pay-per-request.
          headers:
            PAYMENT-REQUIRED:
              description: >-
                The x402 v2 payment challenge: base64-encoded JSON whose
                `accepts` array lists how to pay (scheme `exact`, network
                `eip155:8453`, the USDC asset, the `amount` in USDC's six
                decimals and the receiving `payTo` address). Sign the payment
                with an x402 client and retry with the result in a
                `PAYMENT-SIGNATURE` header. See
                https://docs.brandfetch.com/agents/pay-per-request.
              schema:
                type: string
            Cache-Control:
              description: >-
                `no-store` — a challenge is issued for one request and must not
                be cached.
              schema:
                type: string
            WWW-Authenticate:
              description: >-
                The MPP challenge: one `Payment` challenge for USDC.e on Tempo,
                which settles from a cent. It is issued for the transaction the
                request body names, so answer it with an `Authorization: Payment
                …` credential and send the same body again. Cards start at
                $0.50, above this price, so no card challenge is issued here; a
                card can pay for standing access on `POST /v2/agents/access`.
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PaymentChallenge'
                  - $ref: '#/components/schemas/PaymentRejected'
        '404':
          description: >-
            Not Found. The transaction label was matched to a domain, but there
            is no brand data to return for it. Like a `200`, it consumes an API
            credit. A payment presented with it is settled, except when the
            response carries `x-bf-error: crawl_queued`. That header means we
            did not hold the brand yet and have started collecting it: retry the
            same request in a minute or two; if the brand could be collected,
            the retry is served it, and otherwise it answers an ordinary `404`,
            which a payment is charged for. A paid request answered this way is
            not charged, and its body carries a `payment` object saying so; the
            same payment can be presented again for the retry while it is still
            valid.
          headers:
            x-bf-error:
              description: >-
                Present when the brand is being collected; a retry shortly after
                is usually served it.
              schema:
                type: string
                enum:
                  - crawl_queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Not Found
                  payment:
                    type: object
                    description: >-
                      Present on a paid request answered with `x-bf-error:
                      crawl_queued`.
                    properties:
                      charged:
                        type: boolean
                        enum:
                          - false
                      documentation:
                        type: string
                        format: uri
                      message:
                        type: string
        '429':
          description: API key quota exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - API key quota exceeded
        '503':
          description: >-
            Brandfetch was temporarily unable to process the request. The
            request itself was valid, so retrying it is safe and may succeed. An
            enrichment `503` never consumes an API credit, and a payment
            presented with it is not settled. A `503` with `Retry-After` on a
            paid request comes from the payment service instead: it could not be
            reached, or, after an MPP credential, whether the payment went
            through is not known yet. Retry after the interval; after an MPP
            credential, retry the exact request with the same credential, and a
            payment that went through is not charged twice. See
            https://docs.brandfetch.com/agents/pay-per-request. This is distinct
            from a `400` carrying `Failed to enrich transaction`, which means
            the descriptor could not be confidently matched to a merchant, so
            retrying it returns the same answer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - >-
                        Transaction enrichment is temporarily unavailable.
                        Please retry.
      security:
        - bearerAuth: []
        - x402Payment: []
        - mppPayment: []
components:
  schemas:
    BrandResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the brand
          nullable: false
        name:
          type: string
          description: Brand name
          nullable: true
        domain:
          type: string
          description: Brand website URL
          nullable: false
        claimed:
          type: boolean
          description: >-
            Set to true if the owner of the brand claimed its brand profile on
            [Brandfetch](https://brandfetch.com)
          nullable: false
        description:
          type: string
          description: Brand description
          nullable: true
        longDescription:
          type: string
          description: Brand long description
          nullable: true
        links:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the social media platform
                nullable: false
                enum:
                  - twitter
                  - facebook
                  - instagram
                  - github
                  - youtube
                  - linkedin
                  - crunchbase
              url:
                type: string
                description: URL of the social media profile
                nullable: false
          description: Social media links of the brand
          nullable: false
        logos:
          type: array
          items:
            type: object
            properties:
              theme:
                type: string
                description: >-
                  See logo theme. Possible values:

                  - **dark**: A dark logo should be displayed on a light
                  background (e.g. #ffffff)

                  - **light**: A light logo should be displayed on a dark
                  background (e.g. #000000)
                nullable: true
                enum:
                  - dark
                  - light
                  - null
              formats:
                type: array
                items:
                  $ref: '#/components/schemas/Format'
                description: A list of format objects containing files in different formats
                nullable: false
              tags:
                type: array
                items:
                  type: string
                description: >-
                  What the image is. Brandfetch tags a brand's icon and logo;
                  one that is no longer the brand's main icon or logo keeps its
                  tags and is listed with type `other`. Possible values:

                  - **photographic**: The image is a photograph, or a logo shown
                  on one, such as a sign or a vehicle.

                  - **portrait**: The image is a photograph mainly of one or
                  more people. An image tagged `portrait` is also tagged
                  `photographic`.

                  - **illustration**: The image is a drawing, painting, cartoon
                  or 3D render that is not a logo.

                  - **screenshot**: The image is a screenshot or mockup of
                  software, a website, an app or a device screen. Logos only.

                  - **text**: The image is a flyer, poster, advert, social media
                  post, infographic, document or menu. Logos only.

                  - **pattern**: The image is an abstract background, texture,
                  gradient or pattern with no subject. Icons only.

                  - **placeholder**: The image is a default avatar, a blank or
                  single-colour image, or a "no image" graphic.

                  - **wordmark**: The logo is the brand's name set in type, with
                  no separate symbol.

                  - **lettermark**: The logo is initials, a monogram or a single
                  letter.

                  - **symbol**: The logo is a symbol alone, without text.

                  - **combination**: The logo pairs a symbol with the name.

                  - **emblem**: The logo's text sits inside a badge, seal or
                  crest.


                  The mark types, `wordmark` to `emblem`, go only on an image
                  that is mainly a logo, one at most. A tag is assigned only
                  when the image clearly is one, so an image without a tag can
                  still be any of these. Logos and icons that Brandfetch has not
                  refreshed since October 2026 may carry fewer tags, or none.
                  Brandfetch may add values.
                nullable: false
              type:
                type: string
                description: >-
                  See logo type. Possible values:

                  - **icon**: The icon that is used on social profiles (e.g.
                  [Tesla's social
                  icon](https://cdn.brandfetch.io/tesla.com/icon))

                  - **logo**: The horizontal logo, seen on large surfaces (e.g.
                  [Tesla's
                  logo](https://asset.brandfetch.io/id2S-kXbuK/idAJ5NMLPG.svg))

                  - **symbol**: The universal mark that abstractly represents
                  the brand (e.g. [Tesla's T
                  symbol](https://asset.brandfetch.io/id2S-kXbuK/idM-t614MT.svg))

                  - **other**: Other is used to refer to any type of logo that
                  is not the primary one. (e.g. Amazon Kindle Logo)
                nullable: false
                enum:
                  - icon
                  - logo
                  - symbol
                  - other
          description: Logos, symbols & icons of the brand
          nullable: false
        colors:
          type: array
          items:
            type: object
            properties:
              hex:
                type: string
                description: Color HEX code
                nullable: false
              type:
                type: string
                description: >-
                  Type of the color. Possible values:

                  - **accent**: The main color that represents the brand (used
                  to draw attention e.g. call to action button)

                  - **dark**: The darker color of the brand (used for surfaces
                  or backgrounds)

                  - **light**: The lighter color of the brand (used for surfaces
                  or backgrounds)

                  - **brand**: The full-color scheme of the brand (used to
                  create color palettes users can pick from)
                nullable: false
                enum:
                  - accent
                  - dark
                  - light
                  - brand
              brightness:
                type: number
                description: >-
                  Color brightness. Calculated based on the standard formula
                  0.2126*R + 0.7152*G + 0.0722*B
                nullable: false
                format: float
          description: Accent, dark, light & palette colors of the brand
          nullable: false
        fonts:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Font family
                nullable: true
              type:
                type: string
                description: Font type
                nullable: false
                enum:
                  - title
                  - body
              origin:
                type: string
                description: >-
                  See font origin. Possible values:

                  - **google**: The font that's hosted on Google Font

                  - **custom**: The font that has been uploaded by the brand
                  itself

                  - **system**: The font that's already installed on the user's
                  operating system (see example)
                enum:
                  - google
                  - custom
                  - system
              originId:
                type: string
                description: Font origin ID
                nullable: true
              weights:
                type: array
                items:
                  type: object
                  properties: {}
          description: Title & body fonts of the brand
          nullable: false
        images:
          type: array
          items:
            type: object
            properties:
              formats:
                type: array
                items:
                  $ref: '#/components/schemas/Format'
                description: Available formats of the image
                nullable: false
              tags:
                type: array
                items:
                  type: string
                description: >-
                  What the image is. A banner that is no longer the brand's main
                  one keeps its tags and is listed with type `other`. Possible
                  values:

                  - **photographic**: The image is a photograph, or a logo shown
                  on one. Banners and pictures.

                  - **portrait**: The image is a photograph mainly of one or
                  more people. Banners and pictures. An image tagged `portrait`
                  is also tagged `photographic`.

                  - **illustration**: The image is a drawing, painting, cartoon
                  or 3D render that is not a logo. Banners and pictures.

                  - **screenshot**: The image is a screenshot or mockup of
                  software, a website, an app or a device screen. Pictures.

                  - **text**: The image is a flyer, poster, advert, social media
                  post, infographic, document or menu. Banners and pictures.

                  - **pattern**: The image is an abstract background, texture,
                  gradient or pattern with no subject. Banners.

                  - **placeholder**: The image is blank, a single colour, or a
                  "no image" graphic. Pictures.


                  A tag is assigned only when the image clearly is one, so an
                  image without a tag can still be any of these. Images that
                  Brandfetch has not refreshed since October 2026 have no tags.
                  Brandfetch may add values.
                nullable: false
              type:
                type: string
                description: >-
                  Image type. `picture` entries are images published on the
                  brand's own site and carry `pictureMetadata`. Their `tags` say
                  what each one is, such as a photograph, a screenshot or a
                  flyer.
                nullable: false
                enum:
                  - banner
                  - other
                  - picture
              pictureMetadata:
                type: object
                description: >-
                  Present on `picture` entries only. Lets you choose between a
                  brand's pictures without fetching the files first.
                properties:
                  score:
                    type: number
                    description: How representative of the brand we consider this picture
                    nullable: false
                  rank:
                    type: integer
                    description: >-
                      Position of this picture among the brand's pictures, by
                      descending score
                    nullable: false
                  naturalWidth:
                    type: integer
                    description: Intrinsic width of the image in pixels
                    nullable: false
                  naturalHeight:
                    type: integer
                    description: Intrinsic height of the image in pixels
                    nullable: false
                  alt:
                    type: string
                    description: Alt text published with the image on the brand's site
                    nullable: false
                  sourceUrl:
                    type: string
                    description: >-
                      URL of the image on the brand's own site. A `picture` can
                      arrive with an empty `formats` array, in which case this
                      is how you reach the image.
                    nullable: false
                  imageCategory:
                    type: string
                    description: Category we classified the image into
                    nullable: true
                  categoryConfidence:
                    type: number
                    description: Confidence in the assigned `imageCategory`
                    nullable: true
                nullable: false
          description: Banner, picture & other images of the brand
          nullable: false
        qualityScore:
          type: number
          description: >-
            Score between 0-1 which indicates the quality of the data for the
            given brand. Useful when you don't want to show lower quality brands
            to your users.


            Lower 3rd is poor quality, middle 3rd is OK quality, upper 3rd is
            high quality. Lower scores indicate that a brand is less likely to
            be "real". For example, where google.com will score high,
            my-random-blog.com will score between 0.3-0.4. The score factors in
            things like data-recency, whether the brand has been claimed, if it
            has been manually verified by our team, the brand's domain ranking
            on the web, as well as other factors.


            Don't rely on a fixed score for any given brand. The way we
            calculate this score may change over time as we add new factors, or
            tweak the weights of existing ones such that a score for a given
            brand may change. However, they will remain aligned such that scores
            divide quality into thirds: low, medium, high.
          nullable: false
        company:
          type: object
          properties:
            employees:
              type: integer
              description: >-
                1 employee, 2-10 employees, 11-50 employees, 51-200 employees,
                201-500 employees, 501-1,000 employees, 1,001-5,000 employees,
                5,001-10,000 employees, 10,001+ employees
              enum:
                - 1
                - 2
                - 11
                - 51
                - 201
                - 501
                - 1001
                - 5001
                - 10001
              nullable: true
            financialIdentifiers:
              type: object
              description: Object holding financial identifiers
              properties:
                isin:
                  type: array
                  description: List of ISIN codes
                  items:
                    type: string
                ticker:
                  type: array
                  description: List of Stock or ETF ticker
                  items:
                    type: string
              nullable: true
            foundedYear:
              type: integer
              description: The year the brand was founded
              nullable: true
            industries:
              type: array
              items:
                $ref: '#/components/schemas/Industry'
              description: >-
                An array of industries, sorted by descending `score`. A
                sub-industry carries its top-level industry in `parent`. See the
                full list of industries
                [here](https://docs.google.com/spreadsheets/d/1N44nMfVtPCFM4ebTcmRlqbyxjFtDAGVuqd0mh0dcOU0/edit?usp=sharing)
            kind:
              type: string
              description: Organizational Structure
              enum:
                - EDUCATIONAL
                - GOVERNMENT_AGENCY
                - NON_PROFIT
                - PARTNERSHIP
                - PRIVATELY_HELD
                - PUBLIC_COMPANY
                - SELF_EMPLOYED
                - SELF_OWNED
              nullable: true
            location:
              $ref: '#/components/schemas/Location'
          description: The company object returns firmographic data related to the brand
          nullable: false
        isNsfw:
          type: boolean
          description: true when the brand is for adult content, e.g. is not safe for work
          nullable: false
        urn:
          type: string
          description: Uniform Resource Name for the brand
          nullable: false
        palette:
          type: object
          nullable: true
          description: >-
            The brand's color palette (beta). Present only when the request sets
            `palette=true` or `palette=1`. `null` when Brandfetch has no crawl
            to build one from, for brands with `isNsfw: true`, and when the
            build did not finish in time for this response. In the last case, a
            later request tries again. When a brand has no palette yet, the
            first request builds one from the brand's last crawl without a new
            render. Then `themes` and `onPairs` can be empty until the next
            crawl. When Brandfetch finds no color that it can defend as the
            brand's color, no color has the role `primary`. The shape can change
            while the palette is in beta.
          properties:
            colors:
              type: array
              items:
                type: object
                properties:
                  hex:
                    type: string
                    description: Color HEX code.
                    nullable: false
                  name:
                    type: string
                    description: >-
                      Name of the closest named color. Uses the same list as
                      `colors[].name`, so the same HEX code has the same name
                      everywhere.
                    nullable: true
                  role:
                    type: string
                    description: >-
                      What the color does for the brand. Possible values:
                      `primary`, `secondary`, `accent`, `background`, `surface`,
                      `text`, `muted`, `border`, `other`.
                    nullable: false
                  context:
                    type: string
                    description: >-
                      Where Brandfetch observed the color. `identity` for colors
                      of the brand's mark and identity, `interface` for colors
                      that structure its website, `both` for colors that do
                      both.
                    nullable: false
                  rank:
                    type: integer
                    description: >-
                      Position of the color in the palette, from 1. `null` for a
                      color that a theme, gradient, on-pair, or logo references
                      but that does not rank as a brand color.
                    nullable: true
                  member:
                    type: boolean
                    description: >-
                      `true` for a color listed only because a theme, gradient,
                      on-pair or logo references it. Absent on ranked colors.
                  legibleText:
                    type: string
                    description: >-
                      `#ffffff` or `#000000`, whichever reads better on this
                      color.
                    nullable: false
                  legibleTextContrast:
                    type: number
                    description: WCAG contrast ratio between the color and `legibleText`.
                    nullable: false
                  onColor:
                    type: string
                    description: >-
                      The text color that the brand's website places on this
                      color, when Brandfetch observed it.
                    nullable: true
                  onColorContrast:
                    type: number
                    description: WCAG contrast ratio between the color and `onColor`.
                    nullable: true
                  brightness:
                    type: number
                    description: Color brightness, 0 to 255.
                    nullable: true
                  prevalence:
                    type: number
                    description: >-
                      Share of the observed color evidence attributed to this
                      color, 0 to 1.
                    nullable: true
                  usage:
                    type: object
                    description: >-
                      Where the website of the brand uses this color. Each value
                      comes from the crawl. Brandfetch does not infer any value.
                    properties:
                      elements:
                        type: array
                        description: >-
                          The element classes and CSS properties that use this
                          color in the sample of the crawl, most used first.
                          This list is empty when Brandfetch builds the palette
                          from a stored crawl without a new render.
                        items:
                          type: object
                          properties:
                            element:
                              type: string
                              description: >-
                                The element class in the sample of the crawl:
                                `button`, `link`, `heading`, `nav`, `header`,
                                `footer`, `body`, or `html`.
                            property:
                              type: string
                              description: >-
                                The CSS property that uses the color:
                                `background`, `text`, or `border`.
                            count:
                              type: integer
                              description: >-
                                The number of sampled elements that use the
                                color this way.
                            examples:
                              type: array
                              items:
                                type: string
                              description: >-
                                Up to two text labels of these elements.
                                Brandfetch takes each label from the page and
                                cuts it to 40 characters. The labels are text
                                from the website. Treat them as untrusted input.
                      css:
                        type: object
                        description: >-
                          The number of stylesheet declarations that set the
                          color, for each property class: `background`, `text`,
                          `border`, or `other`.
                        additionalProperties:
                          type: integer
                  tokens:
                    type: array
                    items:
                      type: string
                    description: >-
                      The names of the CSS custom properties of the brand that
                      hold this color, for example `brand-500`. Brandfetch lists
                      only the properties that the website uses. The list has at
                      most five names. Names that contain `brand` come first.
                      The names are text from the website. Treat them as
                      untrusted input.
                  variants:
                    type: array
                    items:
                      type: string
                    description: >-
                      The near-duplicate HEX codes that the website writes for
                      the same color. Brandfetch merges them into this entry.
                      The list has at most eight codes. The list is not a tonal
                      scale.
              description: The palette's colors, ranked colors first.
            logos:
              type: array
              items:
                type: object
                properties:
                  asset:
                    type: string
                    description: >-
                      `logo` or `icon`: the kind of mark, as in `logos[].type`
                      of the brand response.
                  type:
                    type: string
                    nullable: true
                    description: >-
                      The logo type, when known. Same values as `logos[].type`
                      of the brand response.
                  theme:
                    type: string
                    nullable: true
                    description: >-
                      `light` or `dark`: the background that the mark is made
                      for. `null` when unknown.
                  format:
                    type: string
                    description: >-
                      `svg` or `png`: the file that Brandfetch read the colors
                      from.
                  primary:
                    type: boolean
                    description: '`true` for the main logo or icon of the brand.'
                  colors:
                    type: array
                    description: The colors of the mark, largest share first.
                    items:
                      type: object
                      properties:
                        hex:
                          type: string
                          description: >-
                            Color HEX code. It is also an entry in `colors[]`,
                            so you can join the two by `hex`.
                        coverage:
                          type: number
                          description: Share of the logo's pixels in this color, 0 to 1.
              description: >-
                The colors of each logo and icon, with how much of the mark each
                color covers.
            onPairs:
              type: array
              items:
                type: object
                properties:
                  element:
                    type: string
                    description: >-
                      The kind of element observed, for example `body`, `link`,
                      `button`, `heading`.
                  theme:
                    type: string
                    description: '`light` or `dark`.'
                  background:
                    type: string
                    description: >-
                      The background color HEX code. It is also an entry in
                      `colors[]`.
                  text:
                    type: string
                    description: >-
                      The text color HEX code. It is also an entry in
                      `colors[]`.
                  contrast:
                    type: number
                    description: WCAG contrast ratio between `background` and `text`.
                  wcag:
                    type: string
                    description: '`AAA`, `AA`, `AA-large` or `fail`.'
                  count:
                    type: integer
                    description: How many elements showed this pair.
              description: >-
                The background and text color pairs that Brandfetch observed on
                the brand's website, with their contrast. Empty for a palette
                built from a stored crawl without a new render.
            gradients:
              type: array
              items:
                type: object
                properties:
                  rank:
                    type: integer
                    description: Position of the gradient, from 1.
                  type:
                    type: string
                    description: '`linear`, `radial`, or `conic`.'
                  angle:
                    type: number
                    nullable: true
                    description: >-
                      The angle of a linear gradient, in degrees. `null` when
                      the stylesheet gives none.
                  stops:
                    type: array
                    description: The color stops, in order.
                    items:
                      type: object
                      properties:
                        hex:
                          type: string
                          description: Color HEX code. It is also an entry in `colors[]`.
                        position:
                          type: number
                          nullable: true
                          description: >-
                            Position of the stop, 0 to 1. `null` when the
                            stylesheet gives none.
                  css:
                    type: string
                    description: >-
                      The gradient as a CSS value, for example
                      `linear-gradient(90deg, #ff0000 0%, #0000ff 100%)`.
              description: >-
                Gradients from the brand's stylesheets that use a brand color,
                at most four. Every stop color is also an entry in `colors[]`,
                with `rank: null` when it is not a brand color.
            themes:
              type: object
              description: >-
                The `light` and `dark` themes that the website showed. A theme
                that Brandfetch did not observe is absent. A palette built from
                a stored crawl without a new render often has no themes.
              properties:
                light:
                  $ref: '#/components/schemas/PaletteTheme'
                dark:
                  $ref: '#/components/schemas/PaletteTheme'
    PaymentChallenge:
      type: object
      description: >-
        Body of the 402 an unauthenticated request receives when the route can
        be paid for per request. The machine-readable challenges are in the
        `PAYMENT-REQUIRED` header for x402 and the `WWW-Authenticate: Payment`
        header for MPP; this body says the same in prose.
      properties:
        message:
          type: string
          example: >-
            Payment required. Either authenticate with a Brandfetch API key
            (Authorization: Bearer <key>) or pay for this request with x402:
            sign the payment described in the PAYMENT-REQUIRED header and retry
            with a PAYMENT-SIGNATURE header.
        documentation:
          type: string
          example: https://docs.brandfetch.com/agents/pay-per-request
        pricing:
          type: object
          properties:
            route:
              type: string
              example: GET /v2/brands/*
            price:
              type: string
              example: $0.10
        resource:
          type: string
          description: The URL the payment is for.
          example: https://api.brandfetch.io/v2/brands/nike.com
        standingAccess:
          type: string
          example: >-
            For many requests, POST /v2/agents/access (paid the same way)
            provisions an API key preloaded with prepaid credits.
    PaymentRejected:
      type: object
      description: >-
        Body of the 402 a request carrying a `PAYMENT-SIGNATURE`, or an
        `Authorization: Payment …` credential, receives when the payment was not
        accepted or could not be settled. The resource was not served. Nothing
        was charged, so pay afresh and retry, unless the `message` says to retry
        the exact request first (a refused settlement of a standing-access
        purchase).
      properties:
        message:
          type: string
          example: >-
            The payment was not accepted, so the request was not served and
            nothing was charged. Sign a new payment for the PAYMENT-REQUIRED
            header and retry.
        reason:
          type: string
          description: >-
            The payment service's reason code, e.g. `insufficient_funds`. An MPP
            credential adds `credential_spent` (it already paid for a request),
            `credential_in_use` (another request is settling it; retry this
            exact request in a moment) `credential_malformed` (it could not be
            read) and `challenge_invalid` (it answers a challenge this API did
            not issue; answer a fresh one). A Tempo transaction that cannot
            complete adds `nonce_already_used`, `transaction_rejected`,
            `transaction_reverted` and `transaction_expired`: the transfer did
            not happen, so answer a fresh challenge.
          example: insufficient_funds
        documentation:
          type: string
          example: https://docs.brandfetch.com/agents/pay-per-request
    Format:
      type: object
      properties:
        src:
          type: string
          description: File source
        format:
          type: string
          enum:
            - svg
            - webp
            - png
            - jpeg
          description: File format
        height:
          type: integer
          nullable: true
          description: File height in pixels
        width:
          type: integer
          nullable: true
          description: File width in pixels
        size:
          type: integer
          description: File size in bytes
        background:
          type: string
          enum:
            - transparent
          nullable: true
          description: Indicates if the file has a transparent background
    Industry:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the industry
        score:
          type: number
          format: float
          description: >-
            Probability, between 0 and 1, that the brand belongs to this
            industry. A value of 1 marks an industry that was set rather than
            predicted, for example by a curator, an import or a content rule.
        slug:
          type: string
          description: URL friendly identifier
        name:
          type: string
          description: Name of the industry
        emoji:
          type: string
          description: An emoji for the industry
        parent:
          description: If the object is a sub-category, the parent industry
          items:
            $ref: '#/components/schemas/IndustryParent'
          nullable: true
    Location:
      type: object
      description: Company's headquarter information
      properties:
        city:
          type: string
          description: Headquarter city
          nullable: true
        country:
          type: string
          description: Headquarter country
          nullable: true
        countryCode:
          type: string
          description: Headquarter country code (ISO 3166-1 alpha-2)
          nullable: true
        region:
          type: string
          description: Headquarter region
          nullable: true
        state:
          type: string
          description: Headquarter state
          nullable: true
        subregion:
          type: string
          description: Headquarter subregion
          nullable: true
    PaletteTheme:
      type: object
      description: >-
        One theme of the brand's website. Each slot holds a color that the
        render of this theme showed. A slot that the render did not show is
        `null`. Every color is also an entry in `colors[]`.
      properties:
        background:
          type: string
          description: The page background color HEX code.
        surface:
          type: string
          nullable: true
          description: The color HEX code of cards and panels on the page background.
        text:
          type: string
          description: The body text color HEX code.
        muted:
          type: string
          nullable: true
          description: The color HEX code of secondary text.
        border:
          type: string
          nullable: true
          description: The color HEX code of borders and dividers.
        accent:
          type: string
          nullable: true
          description: The color HEX code of links and buttons in this theme.
        contrast:
          type: number
          description: WCAG contrast ratio between `background` and `text`.
    IndustryParent:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the industry
        slug:
          type: string
          description: URL friendly identifier
        name:
          type: string
          description: Name of the industry
        emoji:
          type: string
          description: An emoji for the industry
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    x402Payment:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: >-
        An x402 payment for this one request: the signed payment for the
        challenge a bare request receives in its `PAYMENT-REQUIRED` header.
        Alternative to the bearer API key. See
        https://docs.brandfetch.com/agents/pay-per-request.
    mppPayment:
      type: http
      scheme: Payment
      description: >-
        An MPP (Machine Payments Protocol) payment, settled through Stripe: the
        credential answering one of the `WWW-Authenticate: Payment` challenges a
        bare request receives. Alternative to the bearer API key. See
        https://docs.brandfetch.com/agents/pay-per-request#paying-with-mpp.

````

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