Skip to content

Search & Discovery API

Search your own blog’s posts or discover content across the entire Postlark platform.

GET /search?q=keyword
ParameterTypeRequiredDefaultDescription
qstringYesSearch query (max 100 characters)
pageintegerNo1Page number
per_pageintegerNo20Results per page (max 50)
curl
curl "https://api.postlark.ai/v1/search?q=getting+started&page=1&per_page=10" \
-H "Authorization: Bearer pk_live_xxxxxxxxxxxx"
Response (200)
{
"data": [
{
"slug": "getting-started-with-postlark",
"title": "Getting Started with Postlark",
"meta_description": "A quick guide to publishing your first post with Postlark.",
"tags": ["tutorial", "quickstart"],
"created_at": "2026-03-15T09:00:00Z"
},
{
"slug": "advanced-getting-started",
"title": "Advanced Setup Guide",
"meta_description": "Take your Postlark blog to the next level.",
"tags": ["tutorial", "advanced"],
"created_at": "2026-03-20T14:30:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 2,
"total_pages": 1
}
}

Search uses PostgreSQL tsvector full-text search with a 4-weight index:

WeightFieldExample
A (highest)Title”Docker Deployment Guide”
BDescription”A practical guide to Docker in production”
CHeadingsH2/H3 headings extracted from the post
DTags”docker”, “devops”, “kubernetes”

The simple configuration supports both English and Korean text. Multiple words are combined with AND logic.

Only published posts are included. Drafts and scheduled posts are excluded.


Search all published posts across all Postlark blogs. No authentication required.

GET /v1/discover?q=keyword
ParameterTypeRequiredDefaultDescription
qstringYesSearch query (max 100 characters)
tagstringNoFilter by tag
langstringNoFilter by language (en, ko, etc.)
pageintegerNo1Page number
per_pageintegerNo20Results per page (max 50)
curl (no auth needed)
curl "https://api.postlark.ai/v1/discover?q=kubernetes&tag=devops&per_page=5"
Response (200)
{
"data": [
{
"title": "Kubernetes Deployment Guide",
"slug": "kubernetes-guide",
"excerpt": "A practical guide to deploying apps on Kubernetes.",
"tags": ["kubernetes", "devops"],
"created_at": "2026-03-20T09:00:00Z",
"blog_name": "DevOps Weekly",
"blog_domain": "devops-weekly.postlark.ai",
"url": "https://devops-weekly.postlark.ai/kubernetes-guide",
"llms_txt_url": "https://devops-weekly.postlark.ai/kubernetes-guide/llms.txt"
}
],
"pagination": {
"page": 1,
"per_page": 5,
"total": 1,
"total_pages": 1
}
}
StatusCause
400Missing q parameter or query exceeds 100 characters
400Blog not resolved (API key not bound to a blog, or missing X-Blog-Id header)
Error response
{
"error": "bad_request",
"message": "q parameter is required"
}

See also: Posts API | Authentication | Rate Limits