WordPress REST API
by developer.wordpress.org
Blogs and publishing
Added on October 31st, 2026
Checked and working on November 16th, 2026
Visit developer.wordpress.org →
What it does
Every WordPress site has a built-in REST API at /wp-json/ that gives posts, pages, categories, tags, comments, media and users as JSON. Read public content without authentication; create and edit content with application passwords or OAuth. Useful for headless front ends, apps and syncing content between sites. Free and part of WordPress.
At a glance
- API key
- Not needed · More APIs with no key
- Pricing
- Free and part of WordPress.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET
- Provider
- developer.wordpress.org
- Last checked
- Working on November 16th, 2026
More information: https://developer.wordpress.org/rest-api/
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://wordpress.org/news/wp-json/wp/v2/posts?per_page=1&_fields=id,title,link'
JavaScript
const response = await fetch("https://wordpress.org/news/wp-json/wp/v2/posts?per_page=1&_fields=id,title,link");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://wordpress.org/news/wp-json/wp/v2/posts?per_page=1&_fields=id,title,link",
timeout=30,
)
print(response.json())
The JavaScript works in a web page as well as in Node.js 18 or newer.