Skip to content

Experimental · Unofficial

Built by Tim Benniks. This is not an official Contentstack product and is not supported by Contentstack.

Proxy endpoints

All routes are relative to basePath (default /api/contentstack). GET only.

RouteDescription
GET /searchMulti-type entry search
GET /entries/by-url?url=/pathURL field lookup
GET /entries/:contentType/:uidSingle entry fetch
GET /content-typesList configured types
GET /your-custom-pathVia customRoutes

Search query parameters

ParamAliasDescription
queryqFree-text search
content_typesComma-separated UIDs
limitMax results (capped by maxLimit)
offsetPagination offset
localeLocale code

Example:

GET /api/contentstack/search?query=headless&content_types=blogpost&limit=10

Get by URL

GET /api/contentstack/entries/by-url?url=/blog/my-post&locale=en-us

Get by UID

GET /api/contentstack/entries/blogpost/blt1234567890abcdef

Content types

GET /api/contentstack/content-types

Custom routes

Defined in server config:

typescript
customRoutes: {
  "/products/by-sku": async (request, context) => { /* ... */ },
}

Called at:

GET /api/contentstack/products/by-sku?sku=ABC-123

Custom routes are matched before built-in routes.

Error responses

json
{
  "error": {
    "code": "not_found",
    "message": "No entry found for URL: /missing"
  }
}
StatusCodeWhen
400bad_requestInvalid input
404not_foundEntry or route not found
405method_not_allowedNon-GET request
500internal_errorUnhandled server error

Released under the MIT License.