Going Headless

Craft’s templating system isn’t the only way to get your content out of Craft.

If you want to use Craft as a “headless” CMS, meaning it acts as a content API instead of (or in addition to) a regular website, there are a few ways you can go about it.

TIP

Check out CraftQuest’s Headless Craft CMS course to learn more about using Craft as a headless CMS.

GraphQL

The CraftQL plugin by Mark Huot adds a zero-config GraphQL server to your Craft installation.

JSON API

The first-party Element API offers a simple way to create a read-only JSON API for your content.

REST API

Watch Nate Iler’s How to Create a Full REST API presentation from Dot All 2017 for an in-depth look at how to create a REST API with Craft.

Something Custom

Modules and plugins can define custom front-end controllers that provide new HTTP endpoints. See Extending Craft to get started.