Skip to content

Information API

The information endpoints provide read-only access to everything WPfaker knows about your WordPress installation's structure. They return data about registered post types and their features, available taxonomies, detected custom fields, active field plugin adapters, image providers and their capabilities, supported locales, variation profiles, post meta registrations, and plugin URLs. None of these endpoints modify any data — they are purely for querying.

These endpoints serve two primary purposes. First, they power WPfaker's admin interface: when you open the generation screen and see a dropdown of post types, a list of custom fields, or a set of image provider options, that data was fetched from these endpoints. Second, they are valuable for developers building external integrations. Before constructing a generation request, you can query the information endpoints to discover which post types exist, what fields they have, which field plugins are active, and what image providers are available. This lets you build dynamic tools that adapt to the target WordPress installation rather than hardcoding assumptions.

Every information endpoint is a simple GET request with no required parameters (some accept optional path parameters). Legacy endpoints (post types, taxonomies) return {status: 200, result: ...}. Newer endpoints return {success: true} with data in top-level keys.

TIP

For general information about authentication, error codes, and response format, see the REST API Overview.

Get All Post Types

List every post type registered on the WordPress installation. This includes built-in types like post and page as well as custom post types registered by themes or plugins. The response provides the labels, visibility settings, and structural properties for each type.

Endpoint

GET /wp-json/wpfaker/v1/cpts/all

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/cpts/all" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "status": 200,
  "result": [
    {
      "name": "post",
      "label": "Posts",
      "labels": { "singular_name": "Post", "...": "..." },
      "description": "",
      "public": true,
      "hierarchical": false,
      "has_archive": true,
      "supports": { "title": true, "editor": true, "thumbnail": true, "...": true },
      "taxonomies": ["category", "post_tag"],
      "menu_icon": null,
      "count": { "publish": 42, "draft": 3, "...": 0 }
    },
    {
      "name": "property",
      "label": "Properties",
      "labels": { "singular_name": "Property", "...": "..." },
      "description": "",
      "public": true,
      "hierarchical": false,
      "has_archive": true,
      "supports": { "title": true, "editor": true, "thumbnail": true, "...": true },
      "taxonomies": ["property_type"],
      "menu_icon": "dashicons-building",
      "count": { "publish": 12, "draft": 0, "...": 0 }
    }
  ]
}

INFO

Only public post types are included. WordPress internal types (revision, nav_menu_item, wp_block) are filtered out automatically. attachment and page are also excluded because they are not meaningful targets for content generation.


Get Post Type Supports

Query the features that a specific post type supports. WordPress post types declare support for features like title, editor, thumbnail, excerpt, author, and custom-fields at registration time. This endpoint reveals those declarations, which is useful for understanding what kind of content a post type can hold before generating data for it.

Endpoint

GET /wp-json/wpfaker/v1/cpts/supports/{post_type}

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/cpts/supports/post" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "status": 200,
  "result": {
    "post_type": "post",
    "supports": {
      "title": true,
      "editor": true,
      "author": true,
      "thumbnail": true,
      "excerpt": true,
      "trackbacks": true,
      "custom-fields": true,
      "comments": true,
      "revisions": true,
      "post-formats": true
    }
  }
}

The supports object maps to the features declared via add_post_type_support() or the supports argument in register_post_type(). If a post type does not support thumbnail, setting set_featured_image: true in a generation request has no effect.


Get All Taxonomies

List every taxonomy registered on the WordPress installation, including built-in taxonomies (category, post_tag) and custom taxonomies from themes and plugins. The response shows which post types each taxonomy is associated with, whether it is hierarchical, and its visibility settings.

Endpoint

GET /wp-json/wpfaker/v1/taxonomies/all

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/taxonomies/all" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "status": 200,
  "result": [
    {
      "name": "category",
      "label": "Categories",
      "labels": { "singular_name": "Category", "...": "..." },
      "hierarchical": true,
      "public": true,
      "post_types": ["post"],
      "count": 12
    },
    {
      "name": "post_tag",
      "label": "Tags",
      "labels": { "singular_name": "Tag", "...": "..." },
      "hierarchical": false,
      "public": true,
      "post_types": ["post"],
      "count": 25
    },
    {
      "name": "property_type",
      "label": "Property Types",
      "labels": { "singular_name": "Property Type", "...": "..." },
      "hierarchical": true,
      "public": true,
      "post_types": ["property"],
      "count": 5
    }
  ]
}

The hierarchical flag is important for term generation. Hierarchical taxonomies (like categories) support parent-child relationships, which WPfaker can generate automatically when generate_hierarchy is enabled on the Generate Terms endpoint. Non-hierarchical taxonomies (like tags) are always created as flat lists.


Get Custom Fields

Retrieve the custom fields detected for a specific post type. WPfaker's field plugin adapters scan the active field plugins (ACF, JetEngine, Meta Box AIO, etc.) and return the field definitions they find. Each field includes its name, label, type, required status, and — when applicable — the detected semantic type that WPfaker will use to generate contextually appropriate data.

Endpoint

GET /wp-json/wpfaker/v1/fields/{post_type}

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/fields/property" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "post_type": "property",
  "fields": [
    {
      "key": "field_abc123",
      "name": "property_price",
      "label": "Price",
      "type": "number",
      "required": true,
      "instructions": "Enter the property price",
      "min": 0,
      "max": 10000000
    },
    {
      "key": "field_def456",
      "name": "property_address",
      "label": "Address",
      "type": "textarea",
      "required": true,
      "instructions": ""
    },
    {
      "key": "field_ghi789",
      "name": "property_area",
      "label": "Area (sqm)",
      "type": "number",
      "required": false,
      "instructions": "",
      "min": 0,
      "step": 1
    }
  ],
  "count": 3
}

The detected_type property shows the result of WPfaker's two-tier field name detection system. When a field name matches one of the 740+ built-in patterns across 126 detection types (like price, email, phone, address), the detected type is set immediately. When pattern matching does not produce a confident result and AI detection is enabled, WPfaker consults the configured AI provider (Google Gemini, Anthropic Claude, or OpenAI GPT) for a semantic analysis. You can learn more about the detection process in the Field Detection feature guide.

TIP

If a field's detected_type is empty or seems incorrect, you can clear the detection cache and trigger a fresh analysis. See the Clear Field Detection Cache endpoint, or use the AI Settings endpoint to clear the AI cache.


Get Field Plugins

List the field plugin adapters that WPfaker has loaded and their current status. This endpoint shows which adapters are active and which one is designated as the primary adapter (the one whose field definitions take precedence when multiple plugins register fields for the same post type).

Endpoint

GET /wp-json/wpfaker/v1/field-plugins

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/field-plugins" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "adapters": [
    {
      "name": "ACF Pro",
      "slug": "acf-pro",
      "version": "6.2.0",
      "active": true,
      "primary": true
    },
    {
      "name": "ACF",
      "slug": "acf",
      "version": "6.2.0",
      "active": true,
      "primary": false
    }
  ],
  "primary": "ACF Pro"
}

The primary flag indicates which adapter takes precedence. In the example above, ACF Pro is the primary adapter, and regular ACF is also active but secondary. When both register fields for the same post type, ACF Pro's definitions are used. See the Custom Fields feature guide for the full list of supported plugins and adapter capabilities.


Get Detected Plugins

List all field plugins that WPfaker has detected on the WordPress installation, regardless of whether they are currently active. This is useful for understanding the plugin landscape and diagnosing situations where a field plugin is installed but not activated.

Endpoint

GET /wp-json/wpfaker/v1/detected-plugins

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/detected-plugins" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "plugins": [
    {
      "name": "ACF Pro",
      "slug": "acf-pro",
      "version": "6.2.0",
      "active": true
    },
    {
      "name": "JetEngine",
      "slug": "jetengine",
      "version": "3.2.0",
      "active": true
    },
    {
      "name": "Meta Box AIO",
      "slug": "meta-box",
      "version": "5.9.0",
      "active": true
    },
    {
      "name": "ACPT",
      "slug": "acpt",
      "version": "2.0.0",
      "active": false
    }
  ],
  "summary": { "total": 4, "active": 3, "inactive": 1 }
}

The difference between this endpoint and Get Field Plugins is scope. The field-plugins endpoint only returns adapters that WPfaker has loaded and activated. The detected-plugins endpoint returns every plugin that WPfaker recognizes, including those that are installed but not activated (shown with "active": false).


Get Image Providers

List the image providers available for content generation, along with their capabilities. Each provider's response includes whether it supports image categories, custom dimensions, and — for providers that support categories — the available category names.

Endpoint

GET /wp-json/wpfaker/v1/image-providers

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/image-providers" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "providers": {
    "loremflickr": {
      "name": "LoremFlickr",
      "description": "Real photos by category keyword. No API key needed.",
      "url": "https://loremflickr.com",
      "supports_category": true,
      "requires_api_key": false,
      "configured": true
    },
    "picsum": {
      "name": "Lorem Picsum",
      "description": "Random photos. Does not support categories.",
      "url": "https://picsum.photos",
      "supports_category": false,
      "requires_api_key": false,
      "configured": true
    },
    "unsplash": {
      "name": "Unsplash",
      "description": "High-quality curated photos with category support.",
      "url": "https://unsplash.com",
      "supports_category": true,
      "requires_api_key": false,
      "configured": true
    }
  },
  "categories": {
    "nature": "Nature",
    "architecture": "Architecture",
    "people": "People",
    "food": "Food",
    "business": "Business",
    "technology": "Technology",
    "animals": "Animals",
    "sports": "Sports",
    "travel": "Travel",
    "abstract": "Abstract",
    "real-estate": "Real Estate",
    "interior": "Interior",
    "exterior": "Exterior",
    "portrait": "Portrait / Headshot"
  },
  "default": "loremflickr"
}

Use this endpoint to determine which image_provider and image_category values are valid before constructing a Generate Posts request. Passing an image_category to a provider that does not support categories will result in the category being silently ignored.

INFO

All built-in image providers work without API keys. For setup instructions and provider details, see the Image Handling feature guide.


Get Languages

List all locales supported by WPfaker for content generation. Each locale entry includes the ISO code, English name, native name, and a flag indicator. The response also identifies the currently configured default locale.

Endpoint

GET /wp-json/wpfaker/v1/languages

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/languages" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "languages": [
    {
      "code": "en_US",
      "name": "English (US)",
      "native_name": "English",
      "flag": "us"
    },
    {
      "code": "de_DE",
      "name": "German",
      "native_name": "Deutsch",
      "flag": "de"
    },
    {
      "code": "fr_FR",
      "name": "French",
      "native_name": "Francais",
      "flag": "fr"
    },
    {
      "code": "es_ES",
      "name": "Spanish",
      "native_name": "Espanol",
      "flag": "es"
    },
    {
      "code": "ja_JP",
      "name": "Japanese",
      "native_name": "Nihongo",
      "flag": "jp"
    }
  ],
  "default": "en_US"
}

The code values are valid inputs for the locale parameter on all generation endpoints. When you select a locale, WPfaker generates names, addresses, phone numbers, company names, and body text that follow the conventions of that language and region. See the Languages guide for the full list of 13 supported locales and their characteristics.


Get Variation Profiles

List the content variation profiles available for post generation. Variation profiles control how much randomness WPfaker introduces across a batch of generated posts, affecting field completeness, image presence, taxonomy assignments, and content length.

Endpoint

GET /wp-json/wpfaker/v1/variation-profiles

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/variation-profiles" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "profiles": {
    "random": {
      "name": "Random",
      "description": "Random variation of content (recommended for testing)"
    },
    "minimal": {
      "name": "Minimal",
      "description": "Only required fields, no optional content"
    },
    "partial": {
      "name": "Partial",
      "description": "About 50% of optional fields filled"
    }
  },
  "default": "random"
}

The profile keys (random, minimal, partial) are valid inputs for the variation_profile parameter on the Generate Posts endpoint. The complete profile is not exposed via the API. To generate fully populated content, disable variation by setting enable_variation to false. For a detailed explanation of how each profile affects generated content, see the Content Variation feature guide.


Get Post Meta

Check whether a specific post was generated by WPfaker and retrieve its associated template ID. This endpoint is used by the editor sidebar to display generation status.

Endpoint

GET /wp-json/wpfaker/v1/post-meta/{id}
Path ParameterTypeDescription
idintegerThe WordPress post ID

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/post-meta/42" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "is_generated": true,
  "template_id": 5
}

The is_generated flag indicates whether WPfaker created this post. The template_id contains the ID of the template used during generation, or 0 if no template was used.


Get Plugin URLs

Retrieve WPfaker's plugin URLs and the current version number. This is a utility endpoint used by the admin interface to construct links and display version information.

Endpoint

GET /wp-json/wpfaker/v1/urls

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/urls" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "status": 200,
  "urls": {
    "plugin_url": "https://yoursite.com/wp-content/plugins/wpfaker/",
    "api_url": "https://yoursite.com/wp-json/wpfaker/v1/",
    "admin_url": "https://yoursite.com/wp-admin/",
    "ajax_url": "https://yoursite.com/wp-admin/admin-ajax.php",
    "logo_url": "https://yoursite.com/wp-content/plugins/wpfaker/assets/images/icons/wp-icon-white.png",
    "plugin_dir": "/var/www/html/wp-content/plugins/wpfaker/",
    "plugin_file": "/var/www/html/wp-content/plugins/wpfaker/wpfaker.php",
    "plugin_name": "WPfaker",
    "nonce": "abc123def456"
  }
}

The api_url value is useful for dynamically constructing API endpoint URLs in external tools without hardcoding the WordPress installation path.


Get Users

Retrieve WordPress users with optional role filtering and search. This endpoint powers the user selector in the template editor where you configure the post_author field in choose mode. It returns user IDs, display names, and roles.

Endpoint

GET /wp-json/wpfaker/v1/users

Query Parameters

ParameterTypeRequiredDefaultDescription
rolesarrayNoFilter users by role (e.g., roles[]=author&roles[]=editor)
searchstringNoSearch users by name or email
per_pageintegerNo50Maximum number of users to return

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/users?roles[]=author&per_page=20" \
  -H "X-WP-Nonce: your-nonce"

Get User Roles

Retrieve all user roles registered on the WordPress installation. This endpoint returns the role slugs and display names, which are valid inputs for the roles filter on the Get Users endpoint and for user generation requests.

Endpoint

GET /wp-json/wpfaker/v1/users/roles

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/users/roles" \
  -H "X-WP-Nonce: your-nonce"

Get Dependencies

Analyze the cross-CPT dependencies for a post type. Returns every relational field that references another post type, along with metadata about each target CPT — existing post count, default template availability, and whether the relationship is required. This powers the Dependency Resolver UI and is useful for understanding your content graph before generating posts.

Endpoint

GET /wp-json/wpfaker/v1/dependencies/{post_type}

Path Parameters

ParameterTypeDescription
post_typestringThe post type slug to analyze (e.g., property)

Example Request

bash
curl "https://yoursite.com/wp-json/wpfaker/v1/dependencies/property" \
  -H "X-WP-Nonce: your-nonce"

Response

json
{
  "success": true,
  "post_type": "property",
  "dependencies": [
    {
      "field_name": "property_agent",
      "field_type": "relationship",
      "target_post_types": ["agent"],
      "target_labels": {
        "agent": "Agent"
      },
      "is_multiple": true,
      "source": "field",
      "cardinality": "many_to_many",
      "required": true
    },
    {
      "field_name": "property_location",
      "field_type": "post_object",
      "target_post_types": ["location"],
      "target_labels": {
        "location": "Location"
      },
      "is_multiple": false,
      "source": "field",
      "cardinality": "many_to_one",
      "required": false
    }
  ],
  "unique_targets": {
    "agent": {
      "label": "Agent",
      "plural_label": "Agents",
      "existing_count": 12,
      "has_template": true,
      "template_name": "Default Agent Template",
      "is_required": true,
      "required_by_fields": ["property_agent"]
    },
    "location": {
      "label": "Location",
      "plural_label": "Locations",
      "existing_count": 0,
      "has_template": false,
      "template_name": null,
      "is_required": false,
      "required_by_fields": []
    }
  },
  "count": 2
}

Response Fields

The dependencies array contains one entry per relational field:

FieldTypeDescription
field_namestringThe field's identifier
field_typestringRelational field type (relationship, post_object, post, etc.)
target_post_typesstring[]Post type slugs this field references
target_labelsobjectHuman-readable label for each target post type
is_multiplebooleanWhether the field accepts multiple post references
sourcestring"field" for field plugin fields, "relation" for JetEngine Relations
cardinalitystringmany_to_one, many_to_many, one_to_one, or one_to_many
requiredbooleanWhether the field is marked as required

The unique_targets object provides metadata for each distinct target CPT:

FieldTypeDescription
labelstringSingular label of the target post type
plural_labelstringPlural label of the target post type
existing_countintegerNumber of published posts of this type
has_templatebooleanWhether a default WPfaker template exists for this CPT
template_namestring|nullName of the default template, if one exists
is_requiredbooleanWhether any required field references this CPT
required_by_fieldsstring[]Field names that require this CPT

TIP

Use existing_count and the cardinality defaults to determine whether auto-creation will trigger during generation. If existing_count already meets or exceeds the cardinality default, no additional posts are created for that target CPT.

Released under the GPL2 License. wpfaker.com