PHPackages                             bueltge/wp-rest-api-filter-items - 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. bueltge/wp-rest-api-filter-items

ActiveWordpress-plugin[API Development](/categories/api)

bueltge/wp-rest-api-filter-items
================================

Removing Content From WP API Response on your request.

1.0.0(7y ago)643612[2 issues](https://github.com/bueltge/wp-rest-api-filter-items/issues)GPL-2.0-or-laterPHPPHP &gt;=5.2.4CI failing

Since Jun 11Pushed 5y ago5 watchersCompare

[ Source](https://github.com/bueltge/wp-rest-api-filter-items)[ Packagist](https://packagist.org/packages/bueltge/wp-rest-api-filter-items)[ RSS](/packages/bueltge-wp-rest-api-filter-items/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

WP REST API Filter Items
========================

[](#wp-rest-api-filter-items)

[![Unit Tests](https://github.com/bueltge/wp-rest-api-filter-items/workflows/PHP%20Unit%20Tests/badge.svg)](https://github.com/bueltge/wp-rest-api-filter-items/actions)[![Build Status](https://camo.githubusercontent.com/8d61036c97b2e47ee291adeff6184da7425ddaf2f35e1554c229c89b18becf2c/68747470733a2f2f7472617669732d63692e6f72672f6275656c7467652f77702d726573742d6170692d66696c7465722d6974656d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bueltge/wp-rest-api-filter-items) [![Code Climate](https://camo.githubusercontent.com/e11d09448088c901ac6cfde1aba58a1a9c6403cb106fbba328ef884b003664a4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6275656c7467652f77702d726573742d6170692d66696c7465722d6974656d732f6261646765732f6770612e737667)](https://codeclimate.com/github/bueltge/wp-rest-api-filter-items) [![License](https://camo.githubusercontent.com/1fcaff7f067d7e1d4d22104a1cf0c9aca067353b285b4aa05dcc25362dbf6823/68747470733a2f2f706f7365722e707567782e6f72672f6275656c7467652f77702d726573742d6170692d66696c7465722d6974656d732f6c6963656e7365)](https://packagist.org/packages/bueltge/wp-rest-api-filter-items)

A WordPress plugin to filters [WordPress REST API](http://wp-api.org/) items for your request. Its removing key and values from WP API response on your request.

Description
-----------

[](#description)

Per default, a post via WordPress REST API would fetch all data in `wp-json/wp/v2/posts`. For many reasons, you might want to exclude certain fields from WP API response in certain circumstances. This plugin enables you to filter your request for fields you require. Add items to the `GET` attribute on the url, like `wp-json/wp/v2/posts?items=id,title,content` in order to get only according field values.

The plugin currently supports the filtering of post, taxonomy and comments.

WP-API Versions
---------------

[](#wp-api-versions)

- **Use the branch [`wp-api-v1`](tree/wp-api-v1) if you use WP-API Version 1.**
- The **`master` branch** is for development, currently ready and open for feature requests for the **WP API Version 2**.

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

[](#installation)

Install static via download, clone the repository or use dependency management via Composer

`composer require bueltge/wp-rest-api-filter-items`

Examples
--------

[](#examples)

#### Result for post: `wp-json/wp/v2/posts?_wp_json_nonce=4355d0c4b3&items=id,title,content`

[](#result-for-post-wp-jsonwpv2posts_wp_json_nonce4355d0c4b3itemsidtitlecontent)

```
[
	{
		"id": 1,
		"title": {
			"rendered": "Hello world!"
		},
		"content": {
			"rendered": "Welcome to WP Beta Dev Sites. This is your first post. Edit or delete it, then start blogging!\n"
		}
	}
]
```

#### Result for taxonomy: `p-json/wp/v2/taxonomies/category?_wp_json_nonce=4355d0c4b3&items=name,slug,types`.

[](#result-for-taxonomy-p-jsonwpv2taxonomiescategory_wp_json_nonce4355d0c4b3itemsnameslugtypes)

```
{
	"name": "Categories",
	"slug": "category",
	"types": [
		"post",
		"archiv"
	]
}
```

#### Result for comments: `wp-json/wp/v2/comments?items=id,author_name`

[](#result-for-comments-wp-jsonwpv2commentsitemsidauthor_name)

```
[
	{
		"id": 1,
		"author_name": "Mr WordPress"
	},
	{
		"id": 2,
		"author_name": "admin"
	}
]
```

Requirements
------------

[](#requirements)

- PHP 5.4
- WordPress 4.\*
- WP REST API

Kudos
-----

[](#kudos)

Thanks @dnaber-de for his [modular, extendable PHP autoloader](https://github.com/dnaber-de/Requisite).

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% 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

Unknown

Total

1

Last Release

2576d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/003585053f7d5d2127d31d5a4e79ba309acc075154f5752de8f429ac42c54dbe?d=identicon)[Syde](/maintainers/Syde)

![](https://avatars.githubusercontent.com/u/133425?v=4)[Frank Bültge](/maintainers/bueltge)[@bueltge](https://github.com/bueltge)

---

Top Contributors

[![bueltge](https://avatars.githubusercontent.com/u/133425?v=4)](https://github.com/bueltge "bueltge (48 commits)")[![dnaber-de](https://avatars.githubusercontent.com/u/1133205?v=4)](https://github.com/dnaber-de "dnaber-de (1 commits)")

---

Tags

rest-apiwordpresswordpress-pluginwp-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bueltge-wp-rest-api-filter-items/health.svg)

```
[![Health](https://phpackages.com/badges/bueltge-wp-rest-api-filter-items/health.svg)](https://phpackages.com/packages/bueltge-wp-rest-api-filter-items)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[sybrew/the-seo-framework

An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.

47882.8k](/packages/sybrew-the-seo-framework)[pressbooks/pressbooks-book

This theme is named after Canadian media theorist Marshall McLuhan, who coined the phrase “the medium is the message.” It is designed for academic writing and is also suitable for fiction. Headings are set in Cormorant Garamond, and body type is set in Lora.

206.7k](/packages/pressbooks-pressbooks-book)[a2design-company/mandrill-cakephp-plugin

Mandrill CakePHP plugin

193.2k](/packages/a2design-company-mandrill-cakephp-plugin)

PHPackages © 2026

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