---
title: "Analyze Endpoint"
method: POST
path: "/api/analyze"
tags: ["Analyze"]
---

# Analyze Endpoint

`POST /api/analyze`

## Request

- Base URL: `https://data.getplace.io` (the document declares no server; this is the origin it was published from)
- URL: `https://data.getplace.io/api/analyze`
- Auth: OAuth 2
  - Password
  - Token URL: `/api/auth/login`

Analyze review data and answer questions using AI. Requires admin.

- **question**: The question to answer about the data
- **city_id**: City to analyze
- **chain_id**: Optional chain filter (by ID)
- **days**: Number of days to analyze (default 30)
- **async_mode**: If true, returns task_id and runs in background

## Query parameters

- `async_mode` boolean: Run asynchronously via Celery

## Request body

- AnalyzeRequest: Request model for analyze endpoint.
  - `question` string, required
  - `city_id` integer, required
  - `chain_id` integer, nullable
  - `days` integer

## Response `200`

Successful Response

- AnalyzeResponse: Response model for analyze endpoint.
  - `status` string, required
  - `answer` string, nullable
  - `message` string, nullable
  - `context` object, nullable
  - `task_id` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getplace/apis/getplace-insights-api.md) - [All operations](https://skmtc.dev/getplace/apis/getplace-insights-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getplace/apis/getplace-insights-api/revisions/0f337387603f?raw)
