PHPackages                             airesvsg/acf-to-rest-api - 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. airesvsg/acf-to-rest-api

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

airesvsg/acf-to-rest-api
========================

Exposes Advanced Custom Fields Endpoints in the WordPress REST API

3.3.4(1y ago)1.4k75.0k—4.5%121[135 issues](https://github.com/airesvsg/acf-to-rest-api/issues)[6 PRs](https://github.com/airesvsg/acf-to-rest-api/pulls)GPL-2.0-onlyPHPPHP &gt;=5.3.2

Since Apr 4Pushed 1y ago28 watchersCompare

[ Source](https://github.com/airesvsg/acf-to-rest-api)[ Packagist](https://packagist.org/packages/airesvsg/acf-to-rest-api)[ Docs](https://github.com/airesvsg/acf-to-rest-api)[ Fund](https://www.paypal.com/donate?hosted_button_id=P4DVDKW4ZV7GE)[ RSS](/packages/airesvsg-acf-to-rest-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (10)Used By (0)Security (1)

ACF to REST API
===============

[](#acf-to-rest-api)

Exposes [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/) Endpoints in the [WordPress REST API](https://developer.wordpress.org/rest-api/)

- [Installation](#installation)
- [Endpoints](#endpoints)
- [Filters](#filters)
- [Deprecated Filters 🆕](#deprecated-filters)
- [Request API Version 🆕](#request-api-version)
- [Field Settings 🆕](#field-settings)
- [Editing the Fields](#editing-the-fields)
- [Examples](#examples)
- [Get ACF Fields Recursively 🆕](#get-acf-fields-recursively)
- [Cache](#cache)

Installation
============

[](#installation)

1. Copy the `acf-to-rest-api` folder into your `wp-content/plugins` folder
2. Activate the `ACF to REST API` plugin via the plugin admin page

Endpoints
=========

[](#endpoints)

EndpointREADABLEEDITABLE/wp-json/acf/v3/posts 🆕✅❌/wp-json/acf/v3/posts/**{id}**✅✅/wp-json/acf/v3/posts/**{id}**/**{field-name}**✅✅/wp-json/acf/v3/pages 🆕✅❌/wp-json/acf/v3/pages/**{id}**✅✅/wp-json/acf/v3/pages/**{id}**/**{field-name}**✅✅/wp-json/acf/v3/users 🆕✅❌/wp-json/acf/v3/users/**{id}**✅✅/wp-json/acf/v3/users/**{id}**/**{field-name}**✅✅/wp-json/acf/v3/**{taxonomy}** 🆕✅❌/wp-json/acf/v3/**{taxonomy}**/**{id}** 🆕✅✅/wp-json/acf/v3/**{taxonomy}**/**{id}**/**{field-name}** 🆕✅✅/wp-json/acf/v3/comments 🆕✅❌/wp-json/acf/v3/comments/**{id}**✅✅/wp-json/acf/v3/comments/**{id}**/**{field-name}**✅✅/wp-json/acf/v3/media 🆕✅❌/wp-json/acf/v3/media/**{id}**✅✅/wp-json/acf/v3/media/**{id}**/**{field-name}**✅✅/wp-json/acf/v3/**{post-type}** 🆕✅❌/wp-json/acf/v3/**{post-type}**/**{id}** 🆕✅✅/wp-json/acf/v3/**{post-type}**/**{id}**/**{field-name}** 🆕✅✅/wp-json/acf/v3/options/**{id}** 🆕✅✅/wp-json/acf/v3/options/**{id}**/**{field-name}** 🆕✅✅Filters
=======

[](#filters)

FilterArgument(s)acf/rest\_api/idmixed ( string, integer, boolean ) **$id**
string **$type** 🆕
string **$controller** 🆕acf/rest\_api/keystring **$key**
WP\_REST\_Request **$request**
string **$type**acf/rest\_api/item\_permissions/getboolean **$permission**
WP\_REST\_Request **$request**
string **$type**acf/rest\_api/item\_permissions/updateboolean **$permission**
WP\_REST\_Request **$request**
string **$type**acf/rest\_api/**{type}**/prepare\_itemmixed ( array, boolean ) **$item**
WP\_REST\_Request **$request**acf/rest\_api/**{type}**/get\_fieldsmixed ( array, WP\_REST\_Request ) **$data**
mixed ( WP\_REST\_Request, NULL ) **$request**acf/rest\_api/field\_settings/show\_in\_rest 🆕boolean **$show**acf/rest\_api/field\_settings/edit\_in\_rest 🆕boolean **$edit**Basic example of how to use the filters, in this case I will set a new permission to get the fields

```
add_filter( 'acf/rest_api/item_permissions/get', function( $permission ) {
  return current_user_can( 'edit_posts' );
} );
```

Deprecated filters
==================

[](#deprecated-filters)

FilterArgument(s)acf/rest\_api/typestring **$type**acf/rest\_api/typesarray **$types**acf/rest\_api/default\_rest\_baseboolean **$default**
string **$type**Request API version
===================

[](#request-api-version)

See below how to select the Request API Version.

1. Open the plugins page;
2. Click the settings link under the pluing name ( `ACF to REST API` );
3. Select your version in the `ACF to REST API` session;
4. Click in the button Save changes.

The other alternative is to define the constant `ACF_TO_REST_API_REQUEST_VERSION` in your `wp-config.php`

```
define( 'ACF_TO_REST_API_REQUEST_VERSION', 2 );
```

Field Settings
==============

[](#field-settings)

In this version is possible to configure the field options via admin.

The options are enabled using the filters below, by default theses options are disabled.

```
// Enable the option show in rest
add_filter( 'acf/rest_api/field_settings/show_in_rest', '__return_true' );

// Enable the option edit in rest
add_filter( 'acf/rest_api/field_settings/edit_in_rest', '__return_true' );
```

Editing the fields
==================

[](#editing-the-fields)

The fields should be sent into the key `fields`.

**Action:**

```

  Site:
  Save

```

**Action:**

```

  Title:
  ACF
  Site:
  Save

```

Use the filter `acf/rest_api/key` to change the key `fields`.

```
add_filter( 'acf/rest_api/key', function( $key, $request, $type ) {
  return 'acf_fields';
}, 10, 3 );
```

Now, the fields should be sent into the key `acf_fields`

```

  Site:
  Save

```

Examples
========

[](#examples)

Sample theme to edit the ACF Fields.

To-do list 🆕

Get ACF Fields Recursively🆕
===========================

[](#get-acf-fields-recursively)

More details:

- Issues

    - [\#109](https://github.com/airesvsg/acf-to-rest-api/issues/109)
    - [\#223](https://github.com/airesvsg/acf-to-rest-api/issues/223)
    - [\#9](https://github.com/airesvsg/acf-to-rest-api/issues/9)
- Pull Request

    - [\#95](https://github.com/airesvsg/acf-to-rest-api/pull/95)

Cache
=====

[](#cache)

Enable caching for WordPress REST API and increase speed of your application.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity55

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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 ~353 days

Recently: every ~412 days

Total

9

Last Release

504d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/396668?v=4)[Aires Gonçalves](/maintainers/airesvsg)[@airesvsg](https://github.com/airesvsg)

---

Top Contributors

[![airesvsg](https://avatars.githubusercontent.com/u/396668?v=4)](https://github.com/airesvsg "airesvsg (52 commits)")[![aksld](https://avatars.githubusercontent.com/u/6853619?v=4)](https://github.com/aksld "aksld (1 commits)")[![dambrogia](https://avatars.githubusercontent.com/u/6516452?v=4)](https://github.com/dambrogia "dambrogia (1 commits)")

---

Tags

acfapicustomfieldsrestrest-apiwordpresswordpress-pluginwpwp-apijsonwordpresswpREST APIfieldsacfwp-apiwordpres-plugin

### Embed Badge

![Health badge](/badges/airesvsg-acf-to-rest-api/health.svg)

```
[![Health](https://phpackages.com/badges/airesvsg-acf-to-rest-api/health.svg)](https://phpackages.com/packages/airesvsg-acf-to-rest-api)
```

###  Alternatives

[nekojira/wp-api-menus

Extends WordPress WP API with menu routes.

1401.5k](/packages/nekojira-wp-api-menus)[sybrew/the-seo-framework

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

47078.8k](/packages/sybrew-the-seo-framework)[oomphinc/wp-forms-api

Drupal-esque API for creating and munging forms in WordPress

581.1k](/packages/oomphinc-wp-forms-api)[monitorbacklinks/yii2-wordpress

Yii2 component for integration with Wordpress CMS via XML-RPC API

3326.9k](/packages/monitorbacklinks-yii2-wordpress)

PHPackages © 2026

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