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

# Search

> Start here to find a business and its `id` for profile / complaints / resolve, or to list businesses in a category and place.

## Request contract

* **Method and path:** POST /apis/v1/bbb-org/businesses/search
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/bbb-org/businesses/search`

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

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "bbb-org.businesses.search",
  "method": "POST",
  "path": "/apis/v1/bbb-org/businesses/search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "provider": {
            "summary": "Official provider example; checked against AIsa request constraints",
            "value": {
              "location": "Austin, TX",
              "query": "plumber"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "allOf": [
            {
              "anyOf": [
                {
                  "properties": {
                    "category_id": {}
                  },
                  "required": [
                    "category_id"
                  ]
                },
                {
                  "properties": {
                    "query": {}
                  },
                  "required": [
                    "query"
                  ]
                }
              ]
            }
          ],
          "properties": {
            "accredited_only": {
              "description": "Only BBB Accredited Businesses (`filter_accredited`).",
              "type": "boolean",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "category_id": {
              "description": "Restrict to one BBB type-of-business id (`filter_category`), taken from a previous search's `filters.categories`. Pattern: ^[0-9]{5}-[0-9]{3}$.",
              "type": "string"
            },
            "country": {
              "default": "USA",
              "description": "Market to search: bbb.org serves the United States and Canada.\n\nProvider reference: allowed values [\"USA\", \"CAN\"]; default \"USA\".",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "USA",
                  "CAN"
                ]
              }
            },
            "distance_miles": {
              "description": "Radius around `location` (`filter_distance`); requires `location`.\n\nProvider reference: allowed values [\"5\", \"10\", \"25\", \"50\", \"100\"].",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "5",
                  "10",
                  "25",
                  "50",
                  "100"
                ]
              }
            },
            "location": {
              "description": "City and state/province (`Austin, TX`), or a ZIP / postal code (bbb.org `find_loc`). Omit for a nationwide search.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "min_rating": {
              "description": "Minimum BBB letter grade (`filter_ratings`): A means A and above.\n\nProvider reference: allowed values [\"A\", \"B\", \"C\", \"D\", \"F\"].",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "A",
                  "B",
                  "C",
                  "D",
                  "F"
                ]
              }
            },
            "page": {
              "default": 1,
              "description": "1-based result page of 15 items; bbb.org exposes at most 15 pages per query.\n\nProvider reference: minimum 1; maximum 50; default 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "max": 50,
                "min": 1
              }
            },
            "query": {
              "description": "Business name or category words (bbb.org `find_text`). Required unless `category_id` is given.",
              "type": "string"
            },
            "sort": {
              "default": "Relevance",
              "description": "bbb.org sort order. Distance requires `location`.\n\nProvider reference: allowed values [\"Relevance\", \"Distance\", \"Rating\", \"AToZ\", \"ZToA\"]; default \"Relevance\".",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "Relevance",
                  "Distance",
                  "Rating",
                  "AToZ",
                  "ZToA"
                ]
              }
            },
            "state": {
              "description": "Restrict to one state/province code (`filter_state`). Pattern: ^[A-Z]{2}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            }
          },
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Usage-based pricing. Default request estimate: \$0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/bbb-org.json POST /apis/v1/bbb-org/businesses/search
openapi: 3.1.0
info:
  description: ''
  title: Better Business Bureau
  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:
    bbb-org:
      description: ''
      title: Better Business Bureau
      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: 1f5d03c3c62545d19c3bfcd56a63ed0891cedc279b267ddb0a820d780ec7e9fa
        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/bbb-org/businesses/complaints
    - /apis/v1/bbb-org/businesses/profile
    - /apis/v1/bbb-org/businesses/resolve
    - /apis/v1/bbb-org/businesses/search
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:11c3edc5a48c860a67876006605deb3881985e9c6c5b826a0911658a52be69e1
    facts_hash: 1f5d03c3c62545d19c3bfcd56a63ed0891cedc279b267ddb0a820d780ec7e9fa
    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: bbb-org
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/bbb-org/businesses/search:
    post:
      tags:
        - Better Business Bureau
      summary: Search
      description: >-
        Start here to find a business and its `id` for profile / complaints /
        resolve, or to list businesses in a category and place.
      operationId: bbb-org.businesses.search
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  location: Austin, TX
                  query: plumber
            schema:
              additionalProperties: true
              allOf:
                - anyOf:
                    - properties:
                        category_id: {}
                      required:
                        - category_id
                    - properties:
                        query: {}
                      required:
                        - query
              properties:
                accredited_only:
                  description: Only BBB Accredited Businesses (`filter_accredited`).
                  type: boolean
                  x-alexandria-option-metadata:
                    in: body
                category_id:
                  description: >-
                    Restrict to one BBB type-of-business id (`filter_category`),
                    taken from a previous search's `filters.categories`.
                    Pattern: ^[0-9]{5}-[0-9]{3}$.
                  type: string
                country:
                  default: USA
                  description: >-
                    Market to search: bbb.org serves the United States and
                    Canada.


                    Provider reference: allowed values ["USA", "CAN"]; default
                    "USA".
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - USA
                      - CAN
                distance_miles:
                  description: >-
                    Radius around `location` (`filter_distance`); requires
                    `location`.


                    Provider reference: allowed values ["5", "10", "25", "50",
                    "100"].
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - '5'
                      - '10'
                      - '25'
                      - '50'
                      - '100'
                location:
                  description: >-
                    City and state/province (`Austin, TX`), or a ZIP / postal
                    code (bbb.org `find_loc`). Omit for a nationwide search.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                min_rating:
                  description: >-
                    Minimum BBB letter grade (`filter_ratings`): A means A and
                    above.


                    Provider reference: allowed values ["A", "B", "C", "D",
                    "F"].
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - A
                      - B
                      - C
                      - D
                      - F
                page:
                  default: 1
                  description: >-
                    1-based result page of 15 items; bbb.org exposes at most 15
                    pages per query.


                    Provider reference: minimum 1; maximum 50; default 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 50
                    min: 1
                query:
                  description: >-
                    Business name or category words (bbb.org `find_text`).
                    Required unless `category_id` is given.
                  type: string
                sort:
                  default: Relevance
                  description: >-
                    bbb.org sort order. Distance requires `location`.


                    Provider reference: allowed values ["Relevance", "Distance",
                    "Rating", "AToZ", "ZToA"]; default "Relevance".
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - Relevance
                      - Distance
                      - Rating
                      - AToZ
                      - ZToA
                state:
                  description: >-
                    Restrict to one state/province code (`filter_state`).
                    Pattern: ^[A-Z]{2}$.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-09-15.
                  summary: Official provider example
                  value:
                    accredited_only: false
                    attribution: Better Business Bureau (bbb.org)
                    count: 15
                    filters:
                      categories:
                        - label: Plumber
                          value: 10113-000
                        - label: Commercial Plumber
                          value: 10113-100
                        - label: Plumbing Renovation
                          value: 10113-300
                      states:
                        - label: MA
                          value: MA
                        - label: TX
                          value: TX
                        - label: VA
                          value: VA
                    items:
                      - accreditation_status: null
                        accredited_charity: true
                        address:
                          city: Austin
                          postal_code: 78753-6003
                          state: TX
                          street: '8410 Georgian Dr # B'
                        address_id: '405686'
                        bbb_id: '0825'
                        business_id: '1000223803'
                        categories:
                          - id: 10113-000
                            name: Plumber
                          - id: 10113-300
                            name: Plumbing Renovation
                          - id: 10113-100
                            name: Commercial Plumber
                        distance_miles: null
                        id: 0825-1000223803
                        is_accredited: true
                        is_charity: false
                        latitude: 30.3
                        local_bbb:
                          id: '0825'
                          name: BBB Heart of Texas
                        location_url: null
                        logo_url: >-
                          https://m.bbb.org/prod/ProfileImages/2024/1f7a8bd4-fdd2-45ca-8963-5c246e1d3b85.png
                        longitude: -97.76
                        name: Calixto Plumbing
                        out_of_business_status: null
                        phones:
                          - (512) 945-3143
                        primary_category:
                          id: 10113-000
                          name: Plumber
                        rating: A+
                        rating_score: 98.49
                        result_id: 0825_1000223803_405686
                        service_areas:
                          - Bell County,  TX
                          - Burnet County,  TX
                          - Lee County,  TX
                        source_url: >-
                          https://www.bbb.org/us/tx/austin/profile/plumber/calixto-plumbing-0825-1000223803
                      - accreditation_status: null
                        accredited_charity: true
                        address:
                          city: Austin
                          postal_code: 78748-1448
                          state: TX
                          street: '10415 Old Manchaca Rd Ste 205 # Suit'
                        address_id: '432144'
                        bbb_id: '0825'
                        business_id: '1000194310'
                        categories:
                          - id: 10113-000
                            name: Plumber
                        distance_miles: null
                        id: 0825-1000194310
                        is_accredited: true
                        is_charity: false
                        latitude: 30.3
                        local_bbb:
                          id: '0825'
                          name: BBB Heart of Texas
                        location_url: null
                        logo_url: >-
                          https://m.bbb.org/prod/ProfileImages/2025/983b8958-9f7f-4b1d-b15c-fd154b889909.jpg
                        longitude: -97.76
                        name: Al Mac Plumbing & Gas, LLC
                        out_of_business_status: null
                        phones:
                          - (512) 645-8578
                        primary_category:
                          id: 10113-000
                          name: Plumber
                        rating: A+
                        rating_score: 100
                        result_id: 0825_1000194310_432144
                        service_areas:
                          - '78730'
                          - '78731'
                          - '78732'
                        source_url: >-
                          https://www.bbb.org/us/tx/austin/profile/plumber/al-mac-plumbing-gas-llc-0825-1000194310
                      - accreditation_status: null
                        accredited_charity: true
                        address:
                          city: Austin
                          postal_code: 78704-0012
                          state: TX
                          street: PO Box 40698
                        address_id: '445822'
                        bbb_id: '0825'
                        business_id: '1000237688'
                        categories:
                          - id: 10113-000
                            name: Plumber
                        distance_miles: null
                        id: 0825-1000237688
                        is_accredited: true
                        is_charity: false
                        latitude: 30.3
                        local_bbb:
                          id: '0825'
                          name: BBB Heart of Texas
                        location_url: null
                        logo_url: >-
                          https://m.bbb.org/prod/ProfileImages/2025/604bb2ed-4a9c-46d3-b9f6-22c33a19671f.png
                        longitude: -97.76
                        name: Abundant Plumbing LLC
                        out_of_business_status: null
                        phones:
                          - (512) 201-9978
                        primary_category:
                          id: 10113-000
                          name: Plumber
                        rating: A
                        rating_score: 94
                        result_id: 0825_1000237688_445822
                        service_areas:
                          - Hays County,  TX
                          - Travis County,  TX
                          - Williamson County,  TX
                        source_url: >-
                          https://www.bbb.org/us/tx/austin/profile/plumber/abundant-plumbing-llc-0825-1000237688
                    location: Austin, TX
                    next_page: 2
                    observed_at_ms: 1789483200000
                    page: 1
                    page_size: 15
                    query: plumber
                    related_categories:
                      - name: Plumber
                        url: https://www.bbb.org/us/tx/austin/category/plumber
                      - name: Commercial Plumber
                        url: >-
                          https://www.bbb.org/us/tx/austin/category/commercial-plumber
                      - name: Plumbing Renovation
                        url: >-
                          https://www.bbb.org/us/tx/austin/category/plumbing-renovation
                    resolved_location:
                      city: Austin
                      country: US
                      display_text: Austin, TX
                      lat_lng: 30.314613,-97.793745
                      postal_code: '78732'
                      state: TX
                    sort: Relevance
                    source_url: >-
                      https://www.bbb.org/search?find_country=USA&find_text=plumber&find_loc=Austin%2C+TX&page=1
                    terms_url: https://www.bbb.org/terms-of-use
                    total_pages: 15
                    total_results: 2540
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            Find businesses on bbb.org by name or category words and an optional
            city/state or postal code, with the site's own filters (accredited
            only, minimum letter grade, category id, state, radius) and sort.
            Returns 15 items per page with BBB identity, canonical profile URL,
            letter grade, accreditation flag, categories, address, phones and
            service areas, plus the filter values bbb.org offers.


            The response contains the tool result directly.


            The provider identifies `items` as the primary payload key.


            | Documented field | Provider type | Description |

            | --- | --- | --- |

            | `accreditation_status` | string | bbb.org's accreditation status
            text when present (e.g. revoked). |

            | `accredited_charity` | boolean |  |

            | `address` | object |  |

            | `address_id` | string | The location (address) id component of
            `result_id`. |

            | `bbb_id` | string | Four-digit id of the local BBB that holds the
            file. |

            | `business_id` | string | Numeric business id assigned by BBB. |

            | `categories` | object[] |  |

            | `distance_miles` | number | Distance from the searched location in
            miles when bbb.org computes it; null otherwise. |

            | `id` | string | Stable bbb.org identity `<bbbId>-<businessId>`,
            the trailing part of every profile URL. |

            | `is_accredited` | boolean | bbb.org `bbbMember`: BBB Accredited
            Business. |

            | `is_charity` | boolean |  |

            | `latitude` | number |  |

            | `local_bbb` | object |  |

            | `location_url` | string | bbb.org page for this specific address
            of a multi-location business, when the row is a secondary location.
            |

            | `logo_url` | string | Logo image URL on m.bbb.org (URL only, never
            stored). |

            | `longitude` | number |  |

            | `name` | string | Business name with bbb.org's <em> highlight
            markup removed. |

            | `out_of_business_status` | string | bbb.org's out-of-business
            status when present; numeric source codes are preserved as strings
            without inferring their meaning. |

            | `phones` | string[] | Business phone numbers as displayed. |

            | `primary_category` | object |  |

            | `rating` | string | BBB letter grade as shown (A+ … F, or NR);
            null when the page shows none. |

            | `rating_score` | number | bbb.org's internal numeric rating score
            (0–100 scale) when exposed; null otherwise. |

            | `result_id` | string | bbb.org's per-row id
            `<bbbId>_<businessId>_<addressId>`; unique within a result. A
            multi-location business appears once per address with the same `id`.
            |

            | `service_areas` | string[] |  |

            | `source_url` | string | Canonical bbb.org profile URL. |



            These are the provider's documented fields. Field requiredness,
            nullability and nested object structures are specified only where
            the descriptions explicitly say so.
        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.