⚠️ The Qwik API has a limited set of features. If you want to build a Qwik app using Builder content, you are most likely looking for our fully-featured Qwik SDK instead.
This API is in beta. Please report issues in our forum. Current features not yet supported are custom components, impression and click tracking, and A/B testing.
Sample Request and Response
What is Qwik
Qwik is a framework for rendering content that is focused on extremely fast site startup. Qwik achieves this in two parts:
- By delivering pure HTML of your content (nothing is faster than HTML)
To integrate Qwik into your site, you will need to do two things:
- Integrate qwikloader.js
- Integrate content fetching code.
Qwik REST API delivers static HTML. To make the HTML interactive, Qwik requires a small (less than 1kb) library which needs to be included in your site.
The next step is to download and inline the content into the HTML
Assume you have a
<div id="my-content"></div> into which
you would like to load the content.
If more than one content needs to be retrieved, repeat the above code for each content.
Server Side Rendering
You can try the above in StackBlitz.
Qwik is in beta and therefore comes with limitations. Below is a list of features that are not yet implemented but coming soon:
- Support for registering components
- Support for editing Builder content on the same URL as content served
- Support for a/b testing
- Support for insights/tracking
NOTE: If you would like to have access to all of these features and more, consider using our Qwik SDK instead of the Qwik API.
During page creation time it is useful to be able to preview the page without publishing or waiting for the CDN cache to renew. To achieve this, add additional parameters to the Qwik URL to bypass the cache and to retrieve content that is not yet published. The parameters to add are:
overrides.page=<content-id>(can be found in the URL of the content that you are editing in Builder editor)
Example of a URL that bypasses the cache and always returns the latest (unpublished) version:
API Query Parameters
Your API key
The current URL of the visitor on your site, e.g.
Set to true to include unpublished content in your API response (e.g. for testing)
Mongodb style query of your data. E.g.:
Only include these fields. E.g.
Omit only these fields, E.g.:
Optionally use this to send targeting attributes, e.g.:
Seconds to cache content (sets the max-age of the cache-control header response header). Make higher for better performance, and lower for content that will change more frequently
Looking to hire a 3rd party to help with your project?
Submit a project request and our partnerships team will reach out to connect you with an Expert from our partner ecosystem.