PHPackages                             networkteam/neos-contentapi - 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. [API Development](/categories/api)
4. /
5. networkteam/neos-contentapi

ActiveNeos-package[API Development](/categories/api)

networkteam/neos-contentapi
===========================

Content API for Neos

v0.11.0(1y ago)46.8k↓48.3%4[1 PRs](https://github.com/networkteam/Networkteam.Neos.ContentApi/pulls)1MITPHP

Since Jan 22Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/networkteam/Networkteam.Neos.ContentApi)[ Packagist](https://packagist.org/packages/networkteam/neos-contentapi)[ RSS](/packages/networkteam-neos-contentapi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (28)Used By (1)

Networkteam.Neos.ContentApi
===========================

[](#networkteamneoscontentapi)

Concepts
--------

[](#concepts)

### Site handling

[](#site-handling)

The content API will use the current domain / site of the request, so make sure to call the API via the correct domain when in a multi-site installation.

### Extensibility via Fusion

[](#extensibility-via-fusion)

The API responses are declared by Fusion prototypes. This allows for a high degree of flexibility and customization.

### Simple API

[](#simple-api)

This package does not offer a complex API for querying nodes. It is mainly focused on rendering pages backed by document nodes when using Neos as a headless CMS. It is also perfect to pair with [@networkteam/zebra](https://github.com/networkteam/zebra) and supports full editing of nodes with visual editing.

A node can be fetched either by path (for public access) or by context path (for access with preview in workspaces).

Features
--------

[](#features)

- Support for multi-site installations
- Supports dimensions (e.g. for multi-language sites)
- Supports [Flowpack.Neos.DimensionResolver](https://github.com/Flowpack/neos-dimensionresolver) for flexible dimension routing
- Supports Neos.RedirectHandler (if installed) and `checkRedirects` is enabled in settings

Configuration
-------------

[](#configuration)

```
Networkteam:
  Neos:
    ContentApi:
      recursiveReferencePropertyDepth: 1
      documentList:
        ignoredNodeTypes:
          - 'Neos.Neos:Shortcut'
      # Enable to check redirects of RedirectsHandler (if package is available) if a node is not found
      checkRedirects: false
```

Examples
--------

[](#examples)

### Adding an API prototype for document node types:

[](#adding-an-api-prototype-for-document-node-types)

```
prototype(Neos.Demo:Document.Page.Api) < prototype(Networkteam.Neos.ContentApi:DefaultDocument) {
	content {
		main = Neos.Neos:ContentCollection {
			nodePath = 'main'
		}
		teaser = Neos.Neos:ContentCollection {
			nodePath = 'teaser'
		}
	}
}
prototype(Neos.Demo:Document.LandingPage.Api) < prototype(Neos.Demo:Document.Page.Api)
prototype(Neos.Demo:Document.Homepage.Api) < prototype(Neos.Demo:Document.Page.Api)

```

The idea here is to have a `.Api` prototype for the complete document node type hierarchy. Content as well as arbitrary data can be added to the prototype and will be serialized as JSON.

### Extending API site properties

[](#extending-api-site-properties)

```
contentApi {
	site {
		# Set some additional context variables for default Fusion to work correctly
		@context {
			documentNode = ${site}
			node = ${site}
		}
		navigation = Neos.Fusion:DataStructure {
			mainItems = Neos.Fusion:Map {
				items = ${q(site).children('[instanceof Neos.Neos:Document][_hiddenInIndex=false]')}
				itemName = 'node'
				itemRenderer = Neos.Fusion:DataStructure {
					title = ${q(node).property('title')}
					renderPath = Neos.Neos:NodeUri {
						node = ${node}
						format = 'html'
					}
				}
			}
		}
		content {
			footer = Neos.Neos:ContentCollection {
				nodePath = 'footer'
			}
		}
	}
}

```

This can be fetched via the `/content-api/site` endpoint for the current site (depends on domain).

### Provide a query for list data

[](#provide-a-query-for-list-data)

```
contentApi {
  queries {
    # Declare a simple query that can be used to fetch articles
    articles = Networkteam.Neos.ContentApi:Query.FlowQuery {
      items = ${q(site).find('[instanceof Zebra.Site:Document.Article]')}
      itemName = 'node'
      itemRenderer = Networkteam.Neos.ContentApi:BaseNode

      page = ${params.pagination.page || 0}
      perPage = ${params.pagination.perPage || 3}
    }
  }
}

```

This query can be fetched via the `/content-api/query/articles` endpoint. It uses the predefined `Networkteam.Neos.ContentApi:Query.FlowQuery` to fetch data based on a `FlowQuery` expression.

> Note: For more complex queries, you can create your own query implementation, e.g. based on a search implementation for more efficient queries.

API endpoints
-------------

[](#api-endpoints)

### `/neos/content-api/documents`

[](#neoscontent-apidocuments)

Lists available documents with route path / context path and iterating through dimensions.

A different workspace can be selected via `workspaceName` (needs authentication).

> Note: If `Flowpack.Neos.DimensionResolver` already resolved dimensions e.g. based on the domain, then the dimensions are not iterated.

### `/neos/content-api/document`

[](#neoscontent-apidocument)

Render a document given by `path` or `contextPath`.

### `/neos/content-api/node`

[](#neoscontent-apinode)

Render a single node given by `contextPath`.

### `/neos/content-api/site`

[](#neoscontent-apisite)

Render site properties independent of a single node.

### `/neos/content-api/query/{queryName}`

[](#neoscontent-apiqueryqueryname)

Fetch data for a predefined query.

**Query Parameters:**

- `params`: Parameters for the query (filter, sorting, pagination, etc.). It is dependent on the Fusion implementation which exact parameters are supported.
- `workspaceName`: Workspace name for node context (defaults to live)
- `dimensions`: Dimensions for node context

**Response:**

Query implementations should return a JSON result that contains a list of data and optional meta information:

```
{
  "data": [{ ... }],
  "meta": {
    "total": 1
  }
}
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance62

Regular maintenance activity

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68% of commits — single point of failure

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

Every ~94 days

Recently: every ~158 days

Total

20

Last Release

150d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cbf52f8dce27737b73b79ac2c958434339f3dcf704b17a040956ed9a33eb4ef?d=identicon)[networkteam](/maintainers/networkteam)

---

Top Contributors

[![hlubek](https://avatars.githubusercontent.com/u/33351?v=4)](https://github.com/hlubek "hlubek (34 commits)")[![esdete2](https://avatars.githubusercontent.com/u/34043608?v=4)](https://github.com/esdete2 "esdete2 (11 commits)")[![jonaphil](https://avatars.githubusercontent.com/u/187416060?v=4)](https://github.com/jonaphil "jonaphil (2 commits)")[![bweinzierl](https://avatars.githubusercontent.com/u/30659291?v=4)](https://github.com/bweinzierl "bweinzierl (1 commits)")[![lorenzulrich](https://avatars.githubusercontent.com/u/1816023?v=4)](https://github.com/lorenzulrich "lorenzulrich (1 commits)")[![Rasmizzle](https://avatars.githubusercontent.com/u/47476377?v=4)](https://github.com/Rasmizzle "Rasmizzle (1 commits)")

### Embed Badge

![Health badge](/badges/networkteam-neos-contentapi/health.svg)

```
[![Health](https://phpackages.com/badges/networkteam-neos-contentapi/health.svg)](https://phpackages.com/packages/networkteam-neos-contentapi)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[lstrojny/fxmlrpc

Fast and tiny XML/RPC client with bridges for various HTTP clients

1425.4M30](/packages/lstrojny-fxmlrpc)

PHPackages © 2026

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