PHPackages                             mohsinqk/headless - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mohsinqk/headless

ActiveTypo3-cms-extension[Parsing &amp; Serialization](/categories/parsing)

mohsinqk/headless
=================

This extension provides way to output content from TYPO3 in JSON format.

v3.2.3(3y ago)0474GPL-2.0-or-laterPHP

Since Dec 4Pushed 3y agoCompare

[ Source](https://github.com/MohsinQK/headless)[ Packagist](https://packagist.org/packages/mohsinqk/headless)[ RSS](/packages/mohsinqk-headless/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (16)Versions (3)Used By (0)

TYPO3 Extension `headless` - JSON Content API for TYPO3 Headless solution
=========================================================================

[](#typo3-extension-headless---json-content-api-for-typo3-headless-solution)

[![TYPO3 10](https://camo.githubusercontent.com/614ff8ea70de89b6c0ffa951832460b9b407e0c321814a05fe00c02fe6999487/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31302d6f72616e67652e737667)](https://get.typo3.org/version/10)[![TYPO3 11](https://camo.githubusercontent.com/5432de37ab8517e6d9e6f803a2e1a7674a308c6d93896fe8a6fbc8a4cb50aece/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31312d6f72616e67652e737667)](https://get.typo3.org/version/11)[![CI Status](https://github.com/TYPO3-Initiatives/headless/workflows/CI/badge.svg)](https://github.com/TYPO3-Initiatives/headless/actions)[![Latest Stable Version](https://camo.githubusercontent.com/8e28c1a36c689fcbcef80472e5615d2b3d01340e16bb53ecd2ccd1931c4bd48d/68747470733a2f2f706f7365722e707567782e6f72672f667269656e64736f667479706f332f686561646c6573732f76)](//packagist.org/packages/friendsoftypo3/headless)[![Total Downloads](https://camo.githubusercontent.com/1473df91214dc8a152e2534b4851e1e47b30981baa057f7d2850d439996ff03c/68747470733a2f2f706f7365722e707567782e6f72672f667269656e64736f667479706f332f686561646c6573732f646f776e6c6f616473)](//packagist.org/packages/friendsoftypo3/headless)[![License](https://camo.githubusercontent.com/cb9dc8859e5bd5df3bff00db1c010ba0e1733c7cafd098f8de54fb573d552ef0/68747470733a2f2f706f7365722e707567782e6f72672f667269656e64736f667479706f332f686561646c6573732f6c6963656e7365)](//packagist.org/packages/friendsoftypo3/headless)[![Contributor Covenant](https://camo.githubusercontent.com/29a162993634c8b29ac484c10c05c2db4be4e6ea7a916cf5c130711e91d26364/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e7472696275746f72253230436f76656e616e742d322e302d3462616161612e737667)](CODE_OF_CONDUCT.md)[![Coverage Status](https://camo.githubusercontent.com/5b8988b25ed45a2f4cf77c895f4be35f9709bff69d0c142c82cb4702f3740ffb/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5459504f332d486561646c6573732f686561646c6573732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/TYPO3-Headless/headless/badge.svg?branch=master)

[![Headless](https://github.com/TYPO3-Headless/.github/raw/main/profile/headless.jpeg?raw=true)](https://extensions.typo3.org/extension/headless)

Headless allows you to render JSON from TYPO3 content. You can customize output by changing types, names and nesting of fields.

This extension provides backend part (JSON API) for TYPO3 PWA solution. Second part is a JavaScript application [nuxt-typo3](https://github.com/TYPO3-Headless/nuxt-typo3) which consumes JSON API and renders the content using Vue.js and Nuxt. See frontend documentation here:

If you have any questions just drop a line in #initiative-headless-pwa Slack channel.

URL**Repository:****Read online:****TER:****Slack:**Features
--------

[](#features)

- JSON API for content elements
- JSON API for page and meta data
- JSON API for navigation, layouts
- taking into account all language and translation configuration (e.g. fallback)
- easily extendable with custom fields or custom content elements
- custom data processors directly for headless usage
- support for EXT:form
- support for EXT:felogin
- support for EXT:redirects
- support for EXT:seo
- \[BETA\] backend module for simulating page preview (with specific page type, lang, usergroup)

### Additional extensions and integrations

[](#additional-extensions-and-integrations)

- headless support for EXT:news [headless\_news](https://github.com/TYPO3-Initiatives/headless_news)
- headless support for EXT:solr [headless\_solr](https://github.com/TYPO3-Initiatives/headless_solr)
- headless support for EXT:powermail [headless\_powermail](https://github.com/TYPO3-Initiatives/headless_powermail)
- headless support for EXT:gridelements [headless\_gridelements](https://github.com/itplusx/headless_gridelements)

Requirements and compatibility
------------------------------

[](#requirements-and-compatibility)

With the release of TYPO3 v11.5 LTS we have to move support for TYPO3 v9 and v10 to another branch as changes between those two versions are incompatible. Version 3.x and master branch will support TYPO3 v11, and headless version 2.x keep support for v9 and v10.

#### Headless version 3.x

[](#headless-version-3x)

PHP 7.2PHP 7.3PHP 7.4PHP 8.0TYPO3 v9.5nonononoTYPO3 v10.4nonononoTYPO3 v11.5nonoyesyes#### Headless version 2.x

[](#headless-version-2x)

PHP 7.2PHP 7.3PHP 7.4PHP 8.0TYPO3 v9.5yesyesyesnoTYPO3 v10.4yesyesyesnoTYPO3 v11.5nonononoQuickstart / Demo
-----------------

[](#quickstart--demo)

If you want to take a look at working demo including frontend, backend and demo data, use our DDEV based demo project here:

Installation
------------

[](#installation)

Install extension using composer
`composer require friendsoftypo3/headless`

Then, you should include extension typoscript template, and you are ready to go. Also, please remember to don't use fluid styled content on the same page tree together with ext:headless.

Documentation
-------------

[](#documentation)

[Extension documentation](https://docs.typo3.org/p/friendsoftypo3/headless/master/en-us/Index.html)

JSON Content Object
-------------------

[](#json--content-object)

In headless extension we implemented new JSON Content Object, which allows you to specify what fields you want to output, and how they will look. First, let's take a look at simple example

```
lib.page = JSON
lib.page {
  fields {
    header = TEXT
    header {
      field = header
    }
  }
}

```

Output

```
{
    "header" : "headerFieldValue"
}

```

in addition, keyword `fields` allow you to nest multiple times fields in json, e.g.

```
lib.page = JSON
lib.page {
  fields {
    data {
      fields {
        foo = TEXT
        foo {
          field = bar
        }

        foo1 = TEXT
        foo1 {
          field = bar1
        }
      }
    }
  }
}

```

Output

```
{
    "data": [
        {
            "foo": "bar",
            "foo1": "bar1"
        }
    ]
}

```

INT, FLOAT &amp; BOOL Content Objects for use in JSON Content Object
--------------------------------------------------------------------

[](#int-float--bool-content-objects-for-use-in-json-content-object)

We introduce new simple content objects to improve JSON API response for frontend developers. We can set correct property types, so frontend does not have to deal with string values for fields with numeric values or field that should be true/false.

```
lib.page = JSON
lib.page {
  fields {
    data {
      fields {
        foo = INT
        foo {
          # db value of foo_field = 1
          field = foo_field
        }
        bar = BOOL
        bar {
          # db value of bar_field = 0
          field = bar_field
        }
      }
    }
  }
}

```

Output

```
{
    "data": [
        {
            "foo": 1,
            "bar": false
        }
    ]
}

```

Customizing
-----------

[](#customizing)

You can override every field in output using typoscript. This extension allows you to use standard typoscript objects such as TEXT, COA, CASE.

Page response
-------------

[](#page-response)

n headless v3.0 we introduce a new, smaller, faster and more flat page response. If you want to keep compatibility with your frontend application, you can load a deprecated typoscript template for version 2.x and keep the old structure of the response running.

#### New response (version 3.x) ⬇️

[](#new-response-version-3x-️)

[![image](https://user-images.githubusercontent.com/15106746/136414744-88d54d44-2f3c-4d7d-9911-832ceefcfe16.png)](https://user-images.githubusercontent.com/15106746/136414744-88d54d44-2f3c-4d7d-9911-832ceefcfe16.png)

#### Old response (version 2.x) ⬇️

[](#old-response-version-2x-️)

[![image](https://user-images.githubusercontent.com/15106746/136414370-a4bec856-5a95-4965-b60b-5a37be5ce5c9.png)](https://user-images.githubusercontent.com/15106746/136414370-a4bec856-5a95-4965-b60b-5a37be5ce5c9.png)

DataProcessing
--------------

[](#dataprocessing)

You can use Data Processors just like in `FLUIDTEMPLATE` Content Object, e.g.

```
lib.languages = JSON
lib.languages {
  dataProcessing {
    10 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
    10 {
      languages = auto
      as = languages
    }
  }
}

```

Built in data processors
------------------------

[](#built-in-data-processors)

We provide multiple data processorors for headless usage

### FilesProcessor

[](#filesprocessor)

This processor should be used to process files (standard or media files). Also, it allows you to proccess images.

### GalleryProcessor

[](#galleryprocessor)

Should be used along with `FilesProcessor` (chained). Used for processing mutliple media files.

### MenuProcessor

[](#menuprocessor)

Used for navigation. Works just like standard menu processor.

### FlexFormProcessor

[](#flexformprocessor)

Used for proecessing flexforms.

### RootSitesProcessor

[](#rootsitesprocessor)

Render your all headless sites configuration for your frontend application.

Development
-----------

[](#development)

Development for this extension is happening as part of the TYPO3 PWA initiative, see If you have any questions, join #initiative-pwa Slack channel.

Credits
-------

[](#credits)

A special thanks goes to [macopedia.com](https://macopedia.com) company, which is sponsoring development of this solution.

### Developers involved in the project

[](#developers-involved-in-the-project)

- Łukasz Uznański (Macopedia)
- Adam Marcinkowski (Macopedia)
- Vaclav Janoch (ITplusX)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1257d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f28608f884670883b39ab5ce3947325f6ba9604c7fdb5d243144e3da19b6ec65?d=identicon)[MohsinQK](/maintainers/MohsinQK)

---

Top Contributors

[![twoldanski](https://avatars.githubusercontent.com/u/66474451?v=4)](https://github.com/twoldanski "twoldanski (136 commits)")[![lukaszuznanski](https://avatars.githubusercontent.com/u/15106746?v=4)](https://github.com/lukaszuznanski "lukaszuznanski (89 commits)")[![oskardydo](https://avatars.githubusercontent.com/u/35219888?v=4)](https://github.com/oskardydo "oskardydo (10 commits)")[![patrykmiedziaszczyk](https://avatars.githubusercontent.com/u/87360781?v=4)](https://github.com/patrykmiedziaszczyk "patrykmiedziaszczyk (10 commits)")[![tmotyl](https://avatars.githubusercontent.com/u/515397?v=4)](https://github.com/tmotyl "tmotyl (8 commits)")[![kitzberger](https://avatars.githubusercontent.com/u/1405149?v=4)](https://github.com/kitzberger "kitzberger (8 commits)")[![sabbelasichon](https://avatars.githubusercontent.com/u/13050560?v=4)](https://github.com/sabbelasichon "sabbelasichon (6 commits)")[![theLine](https://avatars.githubusercontent.com/u/2531075?v=4)](https://github.com/theLine "theLine (4 commits)")[![lochmueller](https://avatars.githubusercontent.com/u/3907126?v=4)](https://github.com/lochmueller "lochmueller (4 commits)")[![MohsinQK](https://avatars.githubusercontent.com/u/1622975?v=4)](https://github.com/MohsinQK "MohsinQK (4 commits)")[![iprokhorov](https://avatars.githubusercontent.com/u/40358229?v=4)](https://github.com/iprokhorov "iprokhorov (4 commits)")[![sven-carstens](https://avatars.githubusercontent.com/u/7496761?v=4)](https://github.com/sven-carstens "sven-carstens (3 commits)")[![schloram](https://avatars.githubusercontent.com/u/13196174?v=4)](https://github.com/schloram "schloram (3 commits)")[![svenpet90](https://avatars.githubusercontent.com/u/97380444?v=4)](https://github.com/svenpet90 "svenpet90 (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![ChrisB9](https://avatars.githubusercontent.com/u/7099583?v=4)](https://github.com/ChrisB9 "ChrisB9 (2 commits)")[![zbychu555](https://avatars.githubusercontent.com/u/4426885?v=4)](https://github.com/zbychu555 "zbychu555 (1 commits)")[![derseeli](https://avatars.githubusercontent.com/u/7099278?v=4)](https://github.com/derseeli "derseeli (1 commits)")[![Fanor51](https://avatars.githubusercontent.com/u/10448557?v=4)](https://github.com/Fanor51 "Fanor51 (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")

---

Tags

jsonheadlesstypo3pwa

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mohsinqk-headless/health.svg)

```
[![Health](https://phpackages.com/badges/mohsinqk-headless/health.svg)](https://phpackages.com/packages/mohsinqk-headless)
```

###  Alternatives

[friendsoftypo3/headless

This extension provides way to output content from TYPO3 in JSON format.

168294.8k12](/packages/friendsoftypo3-headless)[friendsoftypo3/headless_news

This extension provides integration with news to output content from TYPO3 in JSON format.

1154.4k](/packages/friendsoftypo3-headless-news)[friendsoftypo3/pwa_manifest

This extension provides Web App Manifest configuration.

1821.3k](/packages/friendsoftypo3-pwa-manifest)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)[hmmh/solr-file-indexer

Solr file indexer for Typo3

13217.4k3](/packages/hmmh-solr-file-indexer)[georgringer/doc

Render documentation based on markdown files directly in the backend

2232.7k](/packages/georgringer-doc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
