Skip to main content

Search Posts

GET/api/v1/content/posts/search

Overview

Performs full-text search across published blog posts, ranking results by relevance. Searches across title, excerpt, and body content.

Authentication

info

No authentication required - Client is resolved from the X-Content-Domain header, which the Cloudflare Worker sets automatically based on the request domain.

Headers

HeaderTypeRequiredDescription
X-Content-DomainstringYesThe domain used to resolve the client tenant. Automatically set by the CF Worker; set manually for external frontend integrations.

Query Parameters

ParameterTypeDefaultDescription
qstringrequiredSearch query (minimum 2 characters)
pageinteger1Page number for pagination
page_sizeinteger20Number of results per page

Response

Same shape as the List Posts endpoint. Results are ranked by relevance to the search query.

postsarray

Array of matching post objects, ranked by relevance

totalinteger

Total number of matching posts

pageinteger

Current page number

page_sizeinteger

Number of results per page

Example Request

curl -s "https://spideriq.ai/api/v1/content/posts/search?q=google+maps&page=1&page_size=10" \
-H "X-Content-Domain: your-domain.com"

Example Response

{
"posts": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"slug": "how-to-scrape-google-maps",
"title": "How to Scrape Google Maps at Scale",
"excerpt": "A step-by-step guide to extracting business data from Google Maps.",
"cover_image_url": "https://cdn.spideriq.ai/blog/maps-guide-cover.webp",
"status": "published",
"published_at": "2026-03-15T09:00:00Z",
"author_name": "Martin Shein",
"author_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"author": {
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"full_name": "Martin Shein",
"slug": "martin-shein",
"avatar_url": "https://cdn.spideriq.ai/authors/martin.webp"
},
"reading_time": 8,
"view_count": 1243,
"is_featured": true,
"tags": ["google-maps", "scraping", "seo"]
}
],
"total": 1,
"page": 1,
"page_size": 10
}

Status Codes

Status CodeMeaningDescription
200OKSearch results returned successfully
422Unprocessable EntityMissing or invalid q parameter (minimum 2 characters)