REST API GEO/AEO 통합 가이드
애플리케이션을 AILabsAudit의 GEO 감사 API에 연결하십시오. 감사, 고객, 보고서, GEO 체크리스트 및 분석을 프로그래밍 방식으로 검색하는 119개 엔드포인트입니다.
사전 요구사항
REST API를 통합하기 전에 다음을 준비하십시오:
Agent 또는 Partner 계정
API 액세스에는 Agent 이상의 플랜 또는 파트너 상태가 필요합니다. 아직 없으시면 액세스를 요청하십시오.
REST API 키
API & 통합 페이지에서 생성된 API 키(aila_... 형식)가 필요합니다.
HTTP 클라이언트
모든 HTTP 클라이언트가 적합합니다: curl, Python requests, JavaScript fetch, Postman 등.
API 키 받기
API 키는 MCP 연결에 사용되는 것과 동일합니다. 이미 있으시면 직접 사용하실 수 있습니다.
API & 통합으로 이동
대시보드에서 계정 → API & 통합으로 이동합니다.
새 키 생성
"API 키 생성"을 클릭하고 이름(예: "내 앱")을 지정한 후 원하는 권한을 선택합니다.
복사 및 안전하게 보관
키는 aila_로 시작합니다. 즉시 복사하십시오 — 다시 표시되지 않습니다. 환경 변수에 저장하고 소스 코드에는 절대 포함하지 마십시오.
팁
119개의 사용 가능한 엔드포인트를 나열하는 다국어 Swagger 문서(/api/v1/docs?lang=fr|en|es|de)를 통해 API를 대화형으로 탐색할 수도 있습니다.
인증
API는 두 가지 인증 방법을 지원합니다. 스택에 맞는 방법을 선택하십시오:
방법 1: X-Api-Key 헤더
curl -H "X-Api-Key: aila_your_key_here" \
https://ailabsaudit.com/api/v1/clients
방법 2: Authorization Bearer
curl -H "Authorization: Bearer aila_your_key_here" \
https://ailabsaudit.com/api/v1/clients
보안
클라이언트 측 코드(브라우저의 JavaScript)에서 API 키를 노출하지 마십시오. 항상 서버(백엔드)에서 API 호출을 수행하십시오.
첫 번째 요청
고객 목록을 검색하여 연결이 작동하는지 확인해 보겠습니다:
curl -s -H "X-Api-Key: aila_your_key_here" \
https://ailabsaudit.com/api/v1/clients | python3 -m json.tool
성공 응답 (200 OK)
{
"success": true,
"data": [
{
"id": 42,
"name": "Acme Corp",
"sector": "Technology",
"website": "https://acme.com",
"country": "FR",
"created_at": "2025-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 1,
"total_pages": 1
}
}
완료되었습니다!
고객 목록이 표시되면 API 키가 작동하는 것입니다. 이제 아래의 모든 사용 가능한 엔드포인트를 탐색할 수 있습니다.
엔드포인트
API는 총 119개 엔드포인트로 구성된 12개 엔드포인트 그룹으로 구성되어 있습니다. 모든 URL은 https://ailabsaudit.com/api/v1/로 시작합니다. 콘텐츠 엔드포인트는 다국어 응답을 위해 선택적 ?lang=fr|en|es|de 매개변수를 허용합니다.
고객
| 방법 | Endpoint | Description |
|---|---|---|
| GET | /clients |
모든 고객 나열 |
| GET | /clients/{id} |
고객 상세 정보 |
| GET | /clients/{id}/contacts |
고객 연락처 |
| GET | /clients/{id}/competitors |
고객 경쟁사 |
| GET | /clients/{id}/360 |
360도 전체 보기 |
Audits
| 방법 | Endpoint | Description |
|---|---|---|
| GET | /audits |
감사 목록 |
| GET | /audits/{id} |
감사 상세 정보 |
| GET | /audits/{id}/results |
감사 결과 |
| GET | /audits/{id}/scores |
가시성 점수 |
| POST | /audits/launch |
새 감사 시작 |
보고서
| 방법 | Endpoint | Description |
|---|---|---|
| GET | /reports |
보고서 목록 |
| GET | /reports/{id} |
보고서 상세 정보 |
| GET | /reports/{id}/download |
PDF 다운로드 |
실행 계획
| 방법 | Endpoint | Description |
|---|---|---|
| GET | /action-plans |
실행 계획 목록 |
| GET | /action-plans/{id} |
계획 상세 정보 |
| GET | /action-plans/{id}/progress |
계획 진행 상황 |
설문지
| 방법 | Endpoint | Description |
|---|---|---|
| GET | /questionnaires |
설문지 목록 |
| GET | /questionnaires/{id}/responses |
설문지 응답 |
Analytics
| 방법 | Endpoint | Description |
|---|---|---|
| GET | /analytics/portfolio |
포트폴리오 개요 |
| GET | /analytics/leaderboard |
가시성 순위 |
| GET | /analytics/scores/distribution |
점수 분포 |
모델
| 메서드 | Endpoint | Description |
|---|---|---|
| GET | /models |
사용 가능한 AI 모델 목록 조회 |
| GET | /models/{id} |
모델 상세 정보 및 요금 |
계정
| 메서드 | Endpoint | Description |
|---|---|---|
| GET | /account/profile |
프로필 |
| GET | /account/credits |
크레딧 잔액 |
| GET | /account/subscription |
구독 정보 |
Blog ?lang=
| 메서드 | Endpoint | Description |
|---|---|---|
| GET | /blog?lang=fr|en|es|de |
블로그 게시물 목록 조회 (다국어) |
| GET | /blog/{slug} |
게시물 상세 정보 |
용어집 ?lang=
| 메서드 | Endpoint | Description |
|---|---|---|
| GET | /glossary?lang=fr|en|es|de |
용어집 용어 목록 조회 (다국어) |
| GET | /glossary/{slug} |
용어 상세 정보 |
GEO Checklist & 환각 URL
| 메서드 | Endpoint | Description |
|---|---|---|
| GET | /clients/{id}/geo-checklist |
GEO 최적화 체크리스트 |
| GET | /clients/{id}/hallucinated-urls |
AI 모델이 감지한 환각 URL |
예약된 감사
| 메서드 | Endpoint | Description |
|---|---|---|
| GET | /scheduled-audits |
예약된 감사 목록 조회 |
| POST | /scheduled-audits |
예약된 감사 생성 |
| PUT | /scheduled-audits/{id} |
예약된 감사 수정 |
| DELETE | /scheduled-audits/{id} |
예약된 감사 삭제 |
전체 문서
API는 16개의 스키마(Client, Audit, GeoChecklist, BlogArticle, GlossaryTerm, HallucinatedUrl 등), rate limit 헤더 및 CORS 지원을 문서화합니다. 119개의 엔드포인트, 매개변수 및 응답 스키마의 전체 목록은 다국어 대화형 Swagger 문서(/api/v1/docs?lang=fr|en|es|de)에서 확인하십시오.
페이지네이션 및 필터
모든 목록 엔드포인트는 쿼리 매개변수를 통한 페이지네이션을 지원합니다:
| 매개변수 | 기본값 | Description |
|---|---|---|
page |
1 |
페이지 번호 |
per_page |
20 |
페이지당 항목 수(최대 100) |
페이지네이션 예시
curl -H "X-Api-Key: aila_your_key_here" \
"https://ailabsaudit.com/api/v1/audits?page=2&per_page=10"
응답의 페이지네이션 객체
{
"pagination": {
"page": 2,
"per_page": 10,
"total": 47,
"total_pages": 5
}
}
오류 및 rate limiting
HTTP 상태 코드
| Code | 의미 |
|---|---|
200 | 성공 |
400 | 잘못된 요청(잘못된 매개변수) |
401 | 인증되지 않음(API 키 누락 또는 유효하지 않음) |
403 | 금지됨(권한 부족) |
404 | 찾을 수 없음 |
429 | 요청 제한 도달 |
500 | 서버 오류 |
오류 응답 형식
{
"success": false,
"error": {
"code": 401,
"message": "Invalid or missing API key"
}
}
Rate limiting
API는 API 키당 분당 60개의 요청을 허용합니다. 응답 헤더에는 제한 정보가 포함됩니다:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1709472000
제한에 도달한 경우
429 응답을 받으면 X-RateLimit-Reset 타임스탬프를 기다린 후 재시도하십시오. 프로덕션 코드에서는 지수 백오프를 구현하십시오.
코드 예제
선호하는 언어로 시작할 수 있는 완전한 예제입니다:
import requests
API_KEY = "aila_your_key_here"
BASE_URL = "https://ailabsaudit.com/api/v1"
headers = {"X-Api-Key": API_KEY}
# List clients
response = requests.get(f"{BASE_URL}/clients", headers=headers)
clients = response.json()
for client in clients["data"]:
print(f"{client['name']} — {client['sector']}")
# Get audits for each client
audits = requests.get(
f"{BASE_URL}/audits",
headers=headers,
params={"client_id": client["id"], "per_page": 5}
).json()
for audit in audits["data"]:
print(f" Audit #{audit['id']} — Score: {audit.get('score', 'N/A')}")
# Download a report as PDF
report_id = 1
r = requests.get(
f"{BASE_URL}/reports/{report_id}/download",
headers=headers
)
if r.status_code == 200:
with open(f"report_{report_id}.pdf", "wb") as f:
f.write(r.content)
print(f"Report saved: report_{report_id}.pdf")
const API_KEY = "aila_your_key_here";
const BASE_URL = "https://ailabsaudit.com/api/v1";
const headers = { "X-Api-Key": API_KEY };
// List clients
async function getClients() {
const response = await fetch(`${BASE_URL}/clients`, { headers });
const { data, pagination } = await response.json();
console.log(`${pagination.total} clients found`);
data.forEach(client => {
console.log(`${client.name} — ${client.sector}`);
});
return data;
}
// Get audit results
async function getAuditResults(auditId) {
const response = await fetch(
`${BASE_URL}/audits/${auditId}/results`,
{ headers }
);
return await response.json();
}
// Paginate through all audits
async function getAllAudits() {
let page = 1;
let allAudits = [];
while (true) {
const response = await fetch(
`${BASE_URL}/audits?page=${page}&per_page=50`,
{ headers }
);
const { data, pagination } = await response.json();
allAudits.push(...data);
if (page >= pagination.total_pages) break;
page++;
}
return allAudits;
}
getClients().then(console.log);
<?php
$apiKey = "aila_your_key_here";
$baseUrl = "https://ailabsaudit.com/api/v1";
function apiRequest($endpoint, $params = []) {
global $apiKey, $baseUrl;
$url = $baseUrl . $endpoint;
if (!empty($params)) {
$url .= "?" . http_build_query($params);
}
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: $apiKey"],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode !== 200) {
throw new Exception("API error: HTTP $httpCode");
}
return json_decode($response, true);
}
// List clients
$clients = apiRequest("/clients");
foreach ($clients["data"] as $client) {
echo "{$client['name']} — {$client['sector']}\n";
}
// Get audits with pagination
$audits = apiRequest("/audits", [
"page" => 1,
"per_page" => 10
]);
echo "Total audits: {$audits['pagination']['total']}\n";
// Get client 360 view
$client360 = apiRequest("/clients/42/360");
print_r($client360["data"]);
Pret a integrer l’API GEO/AEO ?
Creez votre cle API en 30 secondes et commencez a construire votre integration.
Commencer