---
title: "Get Kg Timeline"
method: GET
path: "/api/kg/timeline"
tags: ["knowledge-graph"]
---

# Get Kg Timeline

`GET /api/kg/timeline`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/kg/timeline`
- Auth: none declared

Get knowledge graph entities with temporal data for timeline display.

返回携带有效起始年份的知识图谱实体，用于时间轴可视化。BCE年份以负整数表示。

Cached like /stats: scans kg_entities filtering on the JSON year fields
and only changes on KG re-import.

## Query parameters

- `entity_type` string, nullable: Filter by entity type (e.g. 'person', 'dynasty'). Omit for all temporal entities.
- `limit` integer

## Response `200`

Successful Response

- KGTimelineResponse
  - `entities` KGTimelineEntity[], required
    - `id` integer, required
    - `name_zh` string, required
    - `entity_type` string, required
    - `year_start` integer, required
    - `year_end` integer, nullable
  - `total` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
