Skip to content
  • Why WPGetAPI?
  • Examples
  • Pricing
  • Plugins
    • PRO Plugin
    • API to Posts Plugin
    • OAuth 2.0 Plugin
  • Docs
  • Support
    • Frequently Asked Questions
    • Feature Request
    • Support Ticket
  • account_circle
PRO Plugin
Howdy! How can we help you?
  • Introduction

    • Quick Start
    • Frequently Asked Questions
    • Will this work with my API?
    • Understanding API docs
    • Step by Step Example
  • Setup

    • Setup Page
    • Endpoint Page
    • Parameters - Query String
    • Parameters - Headers
    • Parameters - Body POST
    • Shortcode
    • Template Tag
    • Gutenberg Block
  • Connecting your API

    • API Key in Headers
    • API Key in Query String
    • Authentication & Authorization
  • Output API Data

    • Format API to HTML
    • Format API to HTML Table
    • Format API to Image Gallery
    • Format JSON Data
  • Integrations

    • Send form data to API
    • WPForms to API
    • Gravity Forms to API
    • Contact Form 7 to API
    • WooCommerce to API
    • WooCommerce API Product Sync
    • wpDataTables to API
    • Connect WordPress to OpenAI
    • Connect RapidAPI to WordPress
    • Connect Zoho CRM to WordPress
    • Page Builders (Elementor, DIVI)
    • Formidable Forms to API
    • Elementor Form to API
    • JetFormBuilder to API
    • Fluent Forms to API
    • WS Form to API
    • Ninja Tables to API
    • Easy Digital Downloads(EDD) API Product Sync
    • Ultimate Member Forms to API
  • Tips & Tricks

    • Filters & Action Hooks
    • Code Snippets Plugin
    • Troubleshooting
    • Code Snippets
  • PRO Plugin

    • Installation
    • Actions
    • Tokens
    • Caching
    • Nested data
    • Chaining API calls
    • Dynamic Variables
    • Format API to HTML
    • Call API on user registration
    • Using AJAX to trigger API call
    • Base64 Encoding
    • Licensing
    • Filters & Action Hooks
  • OAuth 2.0 Plugin

    • Installation
    • How it works
    • Grant Type - Client Credentials
    • Grant Type - Authorization Code
    • Licensing
  • API to Posts Plugin

    • Installation
    • Getting Started
    • Multiple Endpoints
    • Mapping Fields
    • Filters & Action Hooks
    • Pagination

This article will run through the basic steps required to create posts, custom posts, listings or WooCommerce products directly from your API data.

We will assume that you have installed WPGetAPI and have setup your API plus the endpoints that you wish to save. View the WPGetAPI Quick Start guide if you need help setting up the API and the endpoint.

Step 1 – Installation & activation

When you purchase the API to Posts plugin, you will need to install and activate the plugin – see our installation guide. You also need to have the free WPGetAPI plugin installed.

Step 2 – Setup your endpoint

After installation you will see a new field called Import & Save added to the end of each endpoint. To activate an endpoint for saving, simply select the Yes option and then save the endpoint.

Upon saving, the endpoint will now be visible within the API to Posts menu.

Important: you should test your endpoint using the ‘Test Endpoint’ button and ensure that it is returning data correctly in PHP array format!

Step 3 – Setup API to Posts

Once you have activated your endpoint(s), visit the API to Posts menu within your WordPress sidebar and you will see the endpoints that you have activated.

Click on the endpoint to begin the setup.

There are now 5 tabs within the API to Posts plugin that will take your API data and turn it into WordPress posts. Whether your data is products, real estate listings or anything else, we call them ‘items’.

  1. API Settings – configure the API data and how it should be imported.
  2. Post Settings- configure the posts or products and how they should be created.
  3. API Importer – provides a button to call your API and then saves the data.
  4. Data Mapping – uses the saved API data and allows you to map the API data to WordPress fields.
  5. Post Creator – provides a button to create the posts based on the mapping and post settings.

1 – API Settings

Data Type

The data within your API may contain either a single item, multiple items or it may be a ‘detail‘ type API.

The plugin will try to detect the type of data and automatically set it to what it detects. Most of the time it will be Multiple items.

The ‘Detail’ Data Type

The Detail Data Type is only used when you are importing data from multiple endpoints. If you need to use multiple endpoints, please see our article here.

Unique Item Key

Each item within your API should have some type of unique key such as ID, id, productId, product_id, listingId, listing_id, itemID, ItemNo or something similar.

In the example below, the unique item key is simply id and this is the value that should go in this field.

The Unique Item Key allows us to identify every single item within your endpoint.

Nested Data Path

This field is optional and may not be required, depending on your API.

In the example below, the Nested Data Path will be products. The reason for this is that we need to find the point at where the array of items begins.

If your API simply returns all of your items (without any keys above it), then you can leave this blank.

If your items are buried deeper under many levels of arrays, you can comma seperate the keys and it will step down through the arrays such as data,results,products as an example.

2 – Post Settings

Post Type

Select the custom post type that your API items will be turned into. This supports any registered post type that is set to ‘public’.

Post Status

Select the status of your created posts.

Post Author

Select the author of your created posts.

Import Type

Select how you want to handle the creation of posts.

Import Interval

Select an interval to call your API and to create posts. This uses a WordPress cron job and runs in the background automatically at your chosen interval.

You can also set this to No Automatic Imports and the endpoint will only ever be imported and saved by manually pressing the Run Importer button.

3 – API Importer

Clicking the Run Importer button will call your API endpoint and save this data within your database.

This saved data is then used to allow the mapping of the data in the next step as well as being the data that the Post Creator uses to create the posts.

4 – Data Mapping

Now that we have imported the data from the API, we can use this data to lay out all the keys within the API items. Each key will be shown on this page with an option to select how the value will be added to your posts.

Looking at the image above, you can see that the ‘content‘ key from the API is being mapped to the ‘Post Content‘ field within WordPress and various other keys are being mapped to custom fields.

The Post Title field is a special one. This text field allows you to add any keys (single key or multiple keys) from the API which will be used to create the post tile.

For example: if you have a key called ‘name‘ which contains the product’s name, and you want to use this name as your Post Title, then you would simply add ‘name’ into this field.

You can also add multiple keys. If you have a car listings API, you could add into this field something like ‘year – make model‘ and the post titles would look something like ‘2022 – Toyota Camry‘.

5 – Post Creator

After mapping the fields, we can now use the Post Creator. Clicking on the Run Post Creator button will begin to process our saved API data and turn that data into posts or products.

After clicking this button, you should not close this page down. The Post Creator runs using AJAX which requires that the window stay open.

Note: if you have mapped an images field and the API contains many images then this can be very, very slow! Each image that needs to be imported will require an API call to get that image, process it and upload it.

On this page
contact_support

Still not sure?

APIs can be daunting and sometimes downright confusing.

But we are here to help! Our support is amazing and we can assist you with any setup required and ensure your API integrations are a success!

Ask Us Anything

Connect your WordPress website to external APIs without writing a single line of code. Send data from WordPress to your API or display data from your API within WordPress.

Support

  • Documentation
  • Support Ticket
  • Refund Policy
  • Contact Us
  • About Us
  • Affiliates

Articles

  • Quick Start Guide
  • WooCommerce Orders to API
  • WooCommerce API Products Sync
  • Contact Form 7 to API
  • WPForms to API
  • Gravity Forms to API
  • WordPress to RapidAPI

WordPress API Plugins

  • Free WPGetAPI Plugin
  • PRO Plugin
  • API to Posts Plugin Plugin
  • OAuth 2.0 Authorization Plugin

© 2025 WPGetAPI. All Rights Reserved.

"*" indicates required fields

Name*
This field is for validation purposes and should be left unchanged.