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

# Search posts

`POST /posts/search`

## Request

- Base URL: `https://api.savanto.ai`
- URL: `https://api.savanto.ai/posts/search`
- Auth: HTTP bearer

Hybrid semantic + lexical search across the workspace's indexed posts / knowledge articles. Pass a natural-language `query`; the response returns the top-matching posts with excerpts, scores, and URLs. Use when you need raw passages to feed another agent; use the chat endpoint when you want a cited, synthesised answer rather than a list of hits.

## Request body

- PostSearchRequest
  - `text` string, required
  - `filters` object
    - `postType` string
    - `status` 'publish' | 'draft' | 'private' | 'pending'
    - `categories` string[]
    - `tags` string[]
  - `limit` integer
  - `searchContext` 'widget' | 'native' | 'chat' | 'api' | 'internal' | 'unknown'
  - `trackAnalytics` boolean

## Response `200`

Search results

- object
  - `object` 'search_result', required
  - `requestId` string, required
  - `data` object, required
    - `items` Post[], required
      - `id` string, required
      - `title` string, required
      - `content` string
      - `excerpt` string
      - `searchableText` string
      - `postType` string
      - `url` string
      - `status` string
      - `authorId` string
      - `authorName` string
      - `wordCount` number
      - `readingTime` number
      - `categories` string[]
      - `tags` string[]
      - `metaTitle` string
      - `metaDescription` string
      - `featuredImage` string, nullable
      - `createdAt` string
      - `updatedAt` string
      - `publishedAt` string, nullable
      - `attributes` object, nullable
      - `metadata` object
      - `source` string
      - `indexStatus` 'active' | 'hidden' | 'disabled'
      - `score` number
      - `matchingChunks` object[]
        - `chunkText` string, required
        - `order` number, required
    - `pagination` Pagination, required
      - `total` number, nullable, required
      - `limit` number, required
      - `hasMore` boolean, required
      - `offset` number
      - `cursor` string, nullable
    - `query` object, required
      - `text` string, required
      - `truncated` boolean
      - `originalLength` integer
      - `filters` object
      - `limit` number
    - `meta` object
      - `classification` unknown
      - `enhanced` boolean
      - `originalText` string
      - `agentUsed` boolean
      - `usageMultiplier` number
      - `fallbackUsed` boolean

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `413`: Payload too large
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/savanto/apis/savanto-api.md) · [All operations](https://skmtc.dev/savanto/apis/savanto-api/llms.txt) · [OpenAPI document](https://skmtc.dev/savanto/apis/savanto-api/revisions/82437327a878?raw)
