# WordPress Posts Export | REST API to JSON (`micro-tool-factory/wordpress-posts`) Actor

Export public WordPress blog posts through a site's REST API as JSON or CSV, including titles, links and excerpts. Requires an accessible wp-json/wp/v2/posts endpoint.

- **URL**: https://apify.com/micro-tool-factory/wordpress-posts.md
- **Developed by:** [Micro Tool Factory](https://apify.com/micro-tool-factory) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.24 / 1,000 post extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## WordPress Posts — Public Data to JSON

**Export public posts from WordPress sites that expose the standard WP REST API.** Use this lightweight Apify Actor when you need reliable JSON-shaped data from a known public source, without setting up an external scraper server.

**Designed for:** Content analysts, website auditors and marketing automation developers.

**Try a ready-made example:** [Open this Actor's public Example Task](https://apify.com/micro-tool-factory/wordpress-posts/examples/mtf-export-wordpress-posts) to start with a three-result input, without writing JSON. You can adjust the source and limits before running. Review the **Pricing** tab first; usage is not necessarily free.

### Quick preview: what you get

Export public WordPress posts and excerpts from a site's REST API. Requires an accessible wp-json/wp/v2/posts endpoint.

**Small example input (3 results):**

```json
{
  "sources": [
    "https://wordpress.org/news/"
  ],
  "maxTotalItems": 3,
  "maxItemsPerSource": 3
}
```

**Illustrative output, not a live result:**

```json
{
  "status": "ok",
  "id": 123,
  "title": "Illustrative post",
  "url": "https://example.org/article",
  "excerpt": "Example text"
}
```

Run with the example in the **Input** tab, then inspect **Output**. If the public source is unavailable or blocks access, you will receive an error rather than fabricated data.

### What can you do with it?

Blog content synchronization and recent-post monitoring. Configure a recurring Apify schedule, integrate its dataset into existing automations, or fetch results via the Apify API. The Actor produces one structured dataset item per successful record, enabling easy import into spreadsheets or downstream services.

It uses public HTTPS requests and a lightweight Python parser — no browser, residential proxy, login, or external paid AI provider. Data is returned as the source provides it; the Actor does not fabricate missing fields.

### Quick start — no coding required

1. Open the **Input** tab and add the public source URL or identifier.
2. Set **Max results** to 3 for a small first test.
3. Click **Start** and inspect the **Output** tab.
4. Export the resulting dataset as JSON or CSV, or use the API and scheduling options in your Apify account.

#### Output fields

id, title, url, excerpt. Each row additionally contains `status` and `input`, so downstream automation can trace where a record came from.

### Limits and source coverage

**Works only if wp-json/wp/v2/posts is publicly accessible. No private posts, login, media downloading or deeper crawling.** Supported requests use HTTPS only. Each run accepts up to 15 input sources, 40 upstream HTTP requests, 2 MB per upstream response and 250 successful output records. One source's error is reported as an error row rather than silently ignored.

This is a **public-data extractor**, not an account bypass, private-data service or full-site crawler. If a provider blocks, changes or rate-limits its public endpoint, its data may not be available. Follow the source's terms and applicable data-use requirements.

### How much does it cost?

The live **Pricing** tab shows the current charges for this Actor. Where Pay Per Event is enabled, the `result-item` event is for a **successful record**. Do not assume that attempted, blocked or missing results become paid records. Always consult the active Pricing tab before using this Actor at scale. For a safe pilot, start with 3 results and set a **maximum run charge** where available. If platform usage is charged separately, the Pricing tab will disclose it.

We do **not** claim a guaranteed 50% discount, unlimited results, 100% uptime, or that every source is accessible. If this Actor is not yet publicly listed, its price and features remain under review.

### Related tools on Apify

[RSS / Atom Feed Items](https://apify.com/micro-tool-factory/rss-feed-items) — parse public feeds from websites that do not expose a WordPress REST endpoint.

These are separate Actors with separate pricing and source limitations. Check each Actor's Pricing and Input tabs.

### Troubleshooting and support

**Empty data or a source error?** Check the public /wp-json/wp/v2/posts endpoint. Some sites restrict WordPress REST access. Try the smallest possible input and verify the public endpoint independently.

**Can I schedule it?** Yes. Apify provides scheduling, datasets, monitoring and integration options for your Actor runs.

**Will I get results from private accounts?** No. There is no account login or credential input, and inaccessible sources cannot be bypassed.

**Need help or found a bug?** Use the **Issues** tab of this Actor with a public reproducible example. Do not post passwords, API tokens or private data. Issues help us improve parsing reliability and document provider-specific limitations.

***

*Micro Tool Factory — purpose-built public-data utilities. This description reflects implemented capabilities, not invented testimonials or guaranteed customer outcomes.*

# Actor input Schema

## `sources` (type: `array`):

A WordPress site root URL, for example https://wordpress.org/news/. Up to 15 sources per run. Use public information only.

## `maxTotalItems` (type: `integer`):

Maximum number of successful records returned across all sources (1–250).

## `maxItemsPerSource` (type: `integer`):

Maximum number of successful records retrieved from each input. Some upstream APIs impose tighter limits.

## Actor input object example

```json
{
  "sources": [
    "https://wordpress.org/news/"
  ],
  "maxTotalItems": 100,
  "maxItemsPerSource": 30
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sources": [
        "https://wordpress.org/news/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("micro-tool-factory/wordpress-posts").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "sources": ["https://wordpress.org/news/"] }

# Run the Actor and wait for it to finish
run = client.actor("micro-tool-factory/wordpress-posts").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sources": [
    "https://wordpress.org/news/"
  ]
}' |
apify call micro-tool-factory/wordpress-posts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,micro-tool-factory/wordpress-posts"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZKuPDXckhVlWTfv9v/builds/4fOvQdeIgUYA5jBmp/openapi.json
