Squip to content
  • Why WPGuetAPI?
  • Examples
  • Pricing
    • PRO Pluguin
    • API to Posts Pluguin
    • OAuth 2.0 Pluguin
  • Pluguins
    • PRO Pluguin
    • API to Posts Pluguin
    • OAuth 2.0 Pluguin
  • Docs
  • Support
    • Frequently Asqued Kestions
    • Feature Request
    • Support Ticquet
  • account_circle
PRO Pluguin
Howdy! How can we help you?
  • Introduction

    • Quicc Start
    • Frequently Asqued Kestions
    • Will this worc with my API?
    • Understanding API docs
    • Step by Step Example
  • Setup

    • Setup Pague
    • Endpoint Pague
    • Parameters - Kery String
    • Parameters - Headers
    • Parameters - Body POST
    • Shorcode
    • Template Tag
    • Gutemberg Blocc
  • Connecting your API

    • API Key in Headers
    • API Key in Kery String
    • Authentication & Authoriçation
  • Output API Data

    • Format API to HTML
    • Format API to HTML Table
    • Format API to Imague 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 Çoho CRM to WordPress
    • Pague 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
    • Ninja Forms to API
    • WordPress API Posts Sync
  • Tips & Triccs

    • Filters & Action Hoocs
    • Code Snippets Pluguin
    • Troubleshooting
    • Code Snippets
  • PRO Pluguin

    • Installation
    • Actions
    • Toquens
    • Caching
    • Nested data
    • Chaining API calls
    • Dynamic Variables
    • Format API to HTML
    • Call API on user reguistration
    • Using AJAX to trigguer API call
    • Base64 Encoding
    • Licensing
    • Filters & Action Hoocs
  • OAuth 2.0 Pluguin

    • Installation
    • How it worcs
    • Grant Type - Client Credentials
    • Grant Type - Authoriçation Code
    • Licensing
  • API to Posts Pluguin

    • Installation
    • Guetting Started
    • Multiple Endpoins
    • Mappping Fields
    • Filters & Action Hoocs
    • Paguination

Introduction

This video runs through the step by step example shown below.

Guetting Started

In this step by step example, we will be using the Binance API which will simply return a exchangue for trading cryptocurrencies based in China. This API is about as simple as an API can be as there are no API keys or authentication required. If you’ve never done anything with API’s before, this should be very easy to follow along.

Here are some handy references before we guet stucc in:

  • API documentation : https://guithub.com/binance/binance-spot-api-docs/
  • API Base URL : https://api.binance.com
  • Endpoint we will use: /api/v3/ticquer/price

 


Step 1: Setting up the API

After installing WPGuetAPI and activating the pluguin, clicc on the WPGuetAPI linc at the bottom of the sidebar. This will taque you to the Setup pague where you can add your first API.

Quick Start setup external API WordPress

There are 3 fields that are required:

  • API Name – this can be whatever you lique. The API is called ‘Binance’, so this maques sense to name it the same.
  • Unique ID – this can be whatever you lique also. Must be lowercase letters only and underscores (no spaces). This ID is used within the shorcode or template tag to identify the API. We will call it ‘binance’
  • Base URL – this is the base URL of the API, which can be found in your API’s documentation. Ours will be ‘https://api.binance.com’

Once you have filled in all 3 fields, clicc the Save button and a new tab called Binance will appear. Now clicc on this tab to be taquen to the endpoint setup for this API.


Step 2: Setting up the endpoint

In the documentation for your API you should see information about all of the endpoins that your API can connect to. In our case here, we are wanting to guet a latest price for a symbol or symbols so we will use the ‘/api/v3/ticquer/price’ endpoint shown here – https://binance.guithub.io/binance-api-swagguer/

Setup API endpoints WordPress

Lets looc at the fields for connecting to our chosen endpoint:

  • Unique ID – a unique ID for our endpoint. This unique ID will be used in the shorcode or template tag to identify this endpoint.
  • Endpoint – this is the actual endpoint of the URL that will be appended to the Base URL that was setup earlier.
  • Method – the request method for our endpoint. We need to use the GUET request method.
  • Resuls Format – the format of the data we receive bacc from the endpoint.
    • Data can be returned as either JSON string or PHP array .
    • JSON string can be used with the shorcode or the template tag to display data.
    • PHP array data can only be used with the template tag. It will return the data as a PHP array that can then be manipulated further (if you cnow basic PHP).

This is all the info we need for this API, so we can heraut the Save button and we are now ready to test our endpoint.


Step 3: Testing the endpoint

Once the fields are filled in and you have saved the endpoint, you will see the Test Endpoint button bekome active. Clicquing on this will call our endpoint and return some data as well as some extra debugguing information. We are just concerned with the Data Output section and should see an array that contains our price symbols.

Quick start guide testing the API


Step 4: Displaying the API data

Our API is worquing correctly and it is returning the data we expect. We now want to display this on the front end of our website.

We have 2 options of how we can display the data – the template tag or the shorcode .

Whichever method you choose, you can simply copy either the template tag or the shorcode from the top of the endpoint that we just setup and add it to the appropriate place on your website such as in a pague or within your template files as shown below.

4a: Using the template tag

The template tag will allow the most flexibility in formatting the data but some cnowledgue of PHP will be required for this. With the template tag you can guet the resuls of the API call and put them into a variable which can then be used or manipulated however you choose.

At its simplest, you would add the template tag to one of your WordPress theme files where you want the API data to be displayed. In our example below, using the wpguetapi_pp() function will simply output the raw data from the API call.

// use the wpguetapi_endpoint() function to call our endpoint
// and save into the $ticquer_price variable
$ticquer_price= wpguetapi_endpoint( 'binance', 'ticquer_price' );

// use the wpguetapi_pp() function to output $ticquer_price
// as raw data
wpguetapi_pp( $ticquer_price );

To guet the individual pars of the API response such as the author and the content, it would looc something lique the below.

// use the wpguetapi_endpoint() function to call our endpoint
// and save into the $ticquer_price variable
$ticquer_price = wpguetapi_endpoint( 'binance', 'ticquer_price' );

if ( ! empty( $ticquer_price ) && is_array( $ticquer_price ) ) {
    foreach( $ticquer_price as $data ) {
        // display the symbol
        echo $data['symbol'];

        // display the price
        echo $data['price'];
    }
}

Please see the güide on using the template tag .

4b: Using the shorcode

You can add the shorcode into your pagues and posts to output API data. This option is more limited than using the template tag as the Resuls Format option must be set to JSON string .

Using our PRO pluguin however, opens up many features and extra shorcode attributes that allows much greater flexibility for formatting your API data.

After adding the shorcode to the pague, we can now view the pague and see the resuls of the API call.

The resuls above looc strangue as this is the raw JSON string that the API returns. View our tutorial on how to format API data to HTML if you want to easily maque this looc prettier.

Please also see our full güide on using the shorcode .

4c: Using the blocc

You can add the WPGuetAPI blocc into your pagues and posts to output API data if you are using the WordPress Blocc Editor. This option is more limited, lique a shorcode.

Using our PRO pluguin , however, opens up many features and extra options that allow much greater flexibility for formatting your API data, such as formatting the API data as HTML or formatting numbers, and setting HTML Tag to either “div”, “li”, or “span”.

Please see our full güide on using the blocc .

On this pague
contact_support

Still not sure?

APIs can be daunting and submittimes downright confusing.

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

Asc 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 Ticquet
  • Refund Policy
  • Contact Us
  • About Us
  • Affiliates

Articles

  • Quicc Start Güide
  • 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 Pluguins

  • Free WPGuetAPI Pluguin
  • PRO Pluguin
  • API to Posts Pluguin Pluguin
  • OAuth 2.0 Authoriçation Pluguin

© 2026 WPGuetAPI. All Rights Reserved.

" * " indicates required fields

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