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

# 通用请求结构

> 所有 GEOBase 开发者 API 共用统一入口，通过 apiCode 指定业务能力、data 承载业务参数。

GEOBase 开发者 API 采用「统一接口 + `apiCode` 路由」模式。开发者始终调用同一个接口，通过 `apiCode` 指定实际业务接口，再按照该 `apiCode` 对应的业务文档填写 `data` 参数。

```http theme={null}
POST https://geobaseapi.aibase.com/v1/openapi/execute
```

## 请求体

统一请求体包含 `apiCode` 和 `data` 两个核心字段：

```json theme={null}
{
  "apiCode": "业务 API Code",
  "data": {
    "业务参数": "按照对应 API 文档填写"
  }
}
```

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `apiCode` | string | 是 | 指定要调用的业务 API，决定实际执行的能力 |
| `data` | object | 否 | 承载该 API 的业务参数，可为空对象 |

## 调用逻辑

<Steps>
  <Step title="客户端发起请求">
    向统一入口 `POST /v1/openapi/execute` 发起请求。
  </Step>

  <Step title="校验 API Key">
    校验 `AIBase-API-Key` 的有效性、有效期与 IP 白名单。
  </Step>

  <Step title="校验 apiCode 与权限">
    读取 `apiCode`，校验对应 API 配置是否存在、启用，以及该 Key 是否具备调用权限。
  </Step>

  <Step title="路由与参数校验">
    路由到对应业务 Handler，校验 `data` 中的业务参数。
  </Step>

  <Step title="实时执行并返回">
    服务端实时执行业务逻辑，直接在当前响应中返回业务结果。
  </Step>
</Steps>

<Note>
  不同 `apiCode` 的 `data` 结构不同，不能假设一致。例如 `geo.brand` 的 `data` 只定义了可选的 `brandId`，而 `geo.competitors` 的 `data.brandId` 为必填。组装请求前请进入对应的[业务 API 页面](/geobase-api/api-reference/brand-list)核对字段。
</Note>

<Card title="继续：了解实时请求模式" icon="arrow-right" href="/geobase-api/quickstart/sync-mode" horizontal>
  确认 SYNC 实时调用的返回方式与超时建议。
</Card>


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