Search Docs
Full-text search across all documentation pages in a project.
Path Parameters
The project ID (e.g., prj_abc123).
Query Parameters
Search query string.
Maximum number of results. Max: 50.
Number of results to skip for pagination.
Filter by page path prefix (e.g., api-reference/).
Response
Search results.
Array of matching results.
Page identifier.
Page title.
Page URL path.
Text snippet with highlighted matches.
Section heading where match was found.
Relevance score.
Total number of matching results.
Search processing time in milliseconds.
Example
curl "https://api.syntext.dev/v1/projects/prj_abc123/search?q=authentication&limit=5" \
-H "Authorization: Bearer stx_abc12345_..."
import { Syntext } from '@syntext/sdk'
const client = new Syntext('stx_abc12345_...')
const results = await client.search('prj_abc123', {
query: 'authentication',
limit: 5,
})
from syntext import Syntext
client = Syntext("stx_abc12345_...")
results = client.search(
"prj_abc123",
query="authentication",
limit=5,
)
Response
{
"data": {
"hits": [
{
"id": "pg_auth001",
"title": "Authentication",
"path": "/api-reference/authentication",
"snippet": "All API requests require <mark>authentication</mark> via API key...",
"section": "Bearer Token",
"score": 0.95
},
{
"id": "pg_guide002",
"title": "Getting Started",
"path": "/guides/quickstart",
"snippet": "Configure <mark>authentication</mark> in your SDK client...",
"section": "Setup",
"score": 0.72
}
],
"total": 12,
"processingTimeMs": 8
}
}
Search Syntax
The search query supports:
- Exact phrases:
"api key"— matches exact phrase - Required terms:
+authentication— term must appear - Excluded terms:
-deprecated— exclude results with this term - Wildcards:
auth*— matches auth, authentication, authorize, etc.
Search is powered by Meilisearch and returns results in under 50ms for most queries.