---
title: "Federated Search"
method: GET
path: "/api/search/federated"
tags: ["search"]
---

# Federated Search

`GET /api/search/federated`

## Request

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

Federated search across local database and Dianjin cross-platform ancient text resources.

联合检索：同时搜索本地数据库和典津跨平台古籍资源。

## Query parameters

- `q` string: 搜索关键词
- `page` integer: 页码
- `size` integer: 每页数量
- `dynasty` string, nullable: 朝代筛选
- `category` string, nullable: 分类筛选
- `lang` string, nullable: 语言筛选
- `sources` string, nullable: 数据源筛选
- `include_dianjin` boolean: 是否包含典津结果

## Response `200`

Successful Response

- FederatedSearchResponse
  - `local_total` integer
  - `local_results` object[]
  - `dianjin_total` integer
  - `dianjin_results` DianjinSearchHit[]
    - `id` string
    - `title` string
    - `datasource_name` string, nullable
    - `datasource_category` string, nullable
    - `datasource_tags` string[]
    - `collection` string, nullable
    - `main_responsibility` string, nullable
    - `edition` string, nullable
    - `detail_url` string, nullable
    - `score` number, nullable
  - `dianjin_error` string, nullable
  - `combined_total` integer

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