ZeroToWP

API

Quick Definition

An API (Application Programming Interface) is a set of rules that lets different software programs communicate with each other. WordPress uses APIs to let plugins, themes, and external apps interact with your site.

WordPress.org — WordPress provides multiple APIs for developers to build on

What Is an API?

API stands for Application Programming Interface. According to MDN Web Docs, an API is "a set of features and rules that exist inside a software program enabling interaction with it through software — as opposed to a human user interface."

Think of an API as a waiter in a restaurant. You (the application) tell the waiter (the API) what you want. The waiter takes your order to the kitchen (the server/database), gets the result, and brings it back. You never interact with the kitchen directly — the API handles the communication.

In web development, APIs let different services talk to each other. When a WordPress plugin pulls your latest tweets, checks your Google Analytics data, or processes a Stripe payment — it's using an API.

APIs in WordPress

WordPress has several built-in APIs that developers use:

  • REST API — the main API for external applications to read and write WordPress data using HTTP requests and JSON. The Block Editor (Gutenberg) is built on top of this.
  • Plugin API — provides hooks (actions and filters) that let plugins modify WordPress behavior without editing core files
  • Settings API — standardized way for plugins to create settings pages
  • Options API — stores and retrieves site settings from the database
  • Widgets API — lets developers create custom widgets
  • Shortcode API — enables custom shortcodes like [gallery]

You also interact with third-party APIs through plugins:

  • Stripe/PayPal APIs — process payments (WooCommerce)
  • Google APIs — Analytics, Search Console, Maps
  • Email APIs — Brevo, SendLayer, Mailchimp for sending emails
  • Social media APIs — embed feeds, share buttons

Why It Matters

APIs are what make WordPress so extensible. Every plugin that connects to an external service uses an API. Every headless WordPress setup runs on the REST API. Understanding APIs helps you choose better plugins and troubleshoot integration issues. For more on WordPress's technical architecture, see our dashboard guide and plugins roundup.

Related Terms

Related Articles