---
title: "Search content"
method: POST
path: "/search"
tags: ["search"]
---

# Search content

`POST /search`

Searches through indexed content using query.

Required roles: All, App

## Request body

- object
  - `query` string, required — Search query string
  - `tags` string[] — target tag names to be obtained
  - `tag_ids` string[] — target tag IDs to be obtained
  - `tag_filter_logic` 'AND' | 'OR' — Logical operator for combining filter conditions
  - `source_types` SourceType[]
  - `file_types` FileType[]
  - `date_from` integer — Start date for content search (Unix timestamp in seconds)
  - `date_to` integer — End date for content search (Unix timestamp in seconds)
  - `domains` string[] — Array of domains to search within (supports partial matching)
  - `metadata` MetadataFilterGroup — (reserved for future use) Filter group with nested structure. Supports combining filters with AND/OR logic.
    - `logic` 'AND' | 'OR' — Logical operator for combining filter conditions
    - `filters` MetadataFilter[] — Filters within this group (combined using the logic operator)
      - `key` string, required — Metadata key
      - `val` unknown
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime', required — Data type of the metadata value
      - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between', required — Comparison operator
      - `min` unknown
      - `max` unknown
    - `groups` MetadataFilterGroup[] — Nested subgroups
  - `source_metadata` MetadataFilterGroup — (reserved for future use) Filter group with nested structure. Supports combining filters with AND/OR logic.
    - `logic` 'AND' | 'OR' — Logical operator for combining filter conditions
    - `filters` MetadataFilter[] — Filters within this group (combined using the logic operator)
      - `key` string, required — Metadata key
      - `val` unknown
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime', required — Data type of the metadata value
      - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between', required — Comparison operator
      - `min` unknown
      - `max` unknown
    - `groups` MetadataFilterGroup[] — Nested subgroups
  - `chunk_metadata` MetadataFilterGroup — (reserved for future use) Filter group with nested structure. Supports combining filters with AND/OR logic.
    - `logic` 'AND' | 'OR' — Logical operator for combining filter conditions
    - `filters` MetadataFilter[] — Filters within this group (combined using the logic operator)
      - `key` string, required — Metadata key
      - `val` unknown
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime', required — Data type of the metadata value
      - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between', required — Comparison operator
      - `min` unknown
      - `max` unknown
    - `groups` MetadataFilterGroup[] — Nested subgroups
  - `metadata_filter` MetadataFilterGroup — (reserved for future use) Filter group with nested structure. Supports combining filters with AND/OR logic.
    - `logic` 'AND' | 'OR' — Logical operator for combining filter conditions
    - `filters` MetadataFilter[] — Filters within this group (combined using the logic operator)
      - `key` string, required — Metadata key
      - `val` unknown
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime', required — Data type of the metadata value
      - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between', required — Comparison operator
      - `min` unknown
      - `max` unknown
    - `groups` MetadataFilterGroup[] — Nested subgroups
  - `limit` integer — Maximum number of results to return
  - `offset` integer — Number of results to skip
  - `use_postfilter` boolean — Whether to bypass LanceDB prefilter and apply WHERE after the vector search (IVF_PQ) returns top-K. Significantly faster for broad filters that cover most of the table, but may return fewer than `limit` results when the hit rate is low.
  - `authz_policy` string — (reserved for future use) Name of the registered authz policy to evaluate for this request. Defaults to the reserved "default" policy when omitted. Ignored when authz is disabled. An unknown or malformed name returns 400.
  - `principal_id` string — Identifier of the end-user (principal) on whose behalf this request is made. Used to look up the principal's authz subject attributes for policy evaluation. When omitted, subject attributes are empty (most restrictive). Ignored when authz is disabled.

## Response `200`

Successful search results

- object
  - `created` integer, required — The Unix timestamp (in seconds) of when the search was performed
  - `results` Content[], required — Array of search results
    - `id` string, required — Content ID
    - `text` string, required — Content chunk from the source
    - `url` string, required — Source URL of the content
    - `title` string, required — Title of the content or document
    - `timestamp` integer, required — Unix timestamp when the content was indexed
    - `file_type` 'html' | 'pdf' | 'ppt' | 'pptx' | 'pptm' | 'doc' | 'docx' | 'docm' | 'xls' | 'xlsx' | 'xlsm' | 'md' | 'txt' | 'jsonl' | 'png' | 'jpg' | 'webp' | 'heic' | 'heif' | 'wav' | 'mp3' | 'aiff' | 'aac' | 'm4a' | 'ogg' | 'flac' | 'mp4' | 'mpg' | 'mov' | 'avi' | 'flv' | 'webm' | 'wmv' | '3gp' | 'notion_page', required — The type of the source file
    - `page_number` integer, required — Page number for paginated documents like PDFs. Set to 0 for sources without page numbers
    - `source_type` 'crawl' | 'local_file' | 'google_drive' | 'github' | 'notion', required — The type of the source
    - `source_id` string — Optional source ID for the original source. For crawl content, use this value with GET /sources/{source_id}/raw to download the stored crawl file content. For local_file content, use GET /sources/{source_id} for source details.
    - `keywords` string[]

## Other responses

- `400` — Bad Request - The request was malformed or invalid
- `401` — Unauthorized - Authentication failed
- `403` — Forbidden - Insufficient permissions
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.net/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.net/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/f5f5994dfe05/schema)
