API Reference
Recommendations
Fetch semantically similar articles for a given article using pgvector embeddings.
Get Recommendations
GET
/blog/v1/recommendationsReturns public articles that are semantically similar to a given article, computed with pgvector embeddings. Authenticated with your API key (Authorization: Bearer mbk_...). Results are cached for one hour.
Query parameters
article_idstringqueryrequiredUUID of the article to find similar content for.
limitintegerquerydefault: 5Number of recommendations to return. Clamped to a maximum of 10.
Response fields
recommendationsArray<Article>Array of similar article objects. Returns an empty array if the article has no computed similar content. On error, the endpoint returns { "recommendations": [] } rather than failing.
{
"recommendations": [
{
"slug": "building-ai-apps-with-next-js",
"title": "Building AI Apps with Next.js",
"excerpt": "A practical guide to integrating AI into your Next.js applications."
}
]
}curl "https://api.misar.io/blog/v1/recommendations?article_id=550e8400-e29b-41d4-a716-446655440000&limit=5" \
-H "Authorization: Bearer mbk_YOUR_KEY"const res = await fetch(
"https://api.misar.io/blog/v1/recommendations?" +
new URLSearchParams({ article_id: "550e8400-e29b-41d4-a716-446655440000", limit: "5" }),
{ headers: { Authorization: `Bearer ${process.env.MISARBLOG_API_KEY}` } }
);
const { recommendations } = await res.json();Errors
400— Missing required parameterarticle_id401— Invalid or missing API key429— Rate limit exceeded (enforced by the shared v1 rate limiter)