# WordPress Posts Exporter — Any WP Site via REST API (wp-json) (`actor-forge/wordpress-posts-exporter`) Actor

Export every post, page, category and tag from any WordPress site via its public REST API: title, dates, author, categories, tags, excerpt, full HTML and text, featured image. Whole back catalogue, not just the feed. Date and search filters. $0.70 per 1,000 items.

- **URL**: https://apify.com/actor-forge/wordpress-posts-exporter.md
- **Developed by:** [ActorForge](https://apify.com/actor-forge) (community)
- **Categories:** SEO tools, Developer tools, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 item exporteds

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 Exporter — Any WP Site via REST API (wp-json)

Export every post, page, category and tag from any WordPress site via its public REST API: title, dates, author, categories, tags, excerpt, full HTML and text, featured image. Whole back catalogue, not just the feed. Date and search filters. $0.70 per 1,000 items.

**Export a whole WordPress site's content: every post, page, category and tag.** Paste any WordPress site URL (a sub-directory install like example.com/blog works too) and the actor finds its public **REST API (wp-json)** and pages through the **entire back catalogue**, not just the 10 newest items an RSS feed shows. Each post comes back as one clean row: **title, link, slug, publish and modified dates in ISO 8601 (UTC), author name, category and tag names (plus their ids), a plain-text excerpt, the full body as HTML and plain text, word count, featured image URL**, sticky and password-protected flags. Pages add parent id and menu order; categories and tags add their description, post count and parent. Filter by **publish date range** and **search text**, take newest or oldest first, and cap items per site. Use it for **content migrations and backups, SEO content audits, competitor content analysis, training data and RAG pipelines, editorial calendars** and archive research. No API key, no login, no browser. **$0.70 per 1,000 items exported**; sites whose REST API is switched off, or whose robots.txt disallows it, get one free row explaining why.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| contentType | title | publishedAt | authorName | categories | wordCount |
| --- | --- | --- | --- | --- | --- |
| post | WordCamp Asia 2027 Is Coming to Penang | 2026-11-11T14:00:00.000Z | Nicholas Garofalo | Community, Events | 556 |
| post | WordPress 7.2 Beta 5 | 2026-11-10T16:59:09.000Z | David Baumwald | Development, Releases | 669 |
| category | Community |  |  |  |  |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `item-exported` | $0.0007 | per post, page, category or tag exported (full content included) | 1,000 posts = $0.70; a 5,000-post blog plus its 300 tags = $3.71 |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at up to 1 GB = $0.00005 (charged as one event) |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `siteUrls` | array | yes | — | Home page URLs of WordPress sites, e.g. example.com, or example.com/blog for a sub-directory install. The REST API (/wp-json/) is found automatically. Sites that turned the API off, or whose robots.txt disallows it, get one free row explaining why. |
| `contentTypes` | array | no | `["posts"]` | Posts, pages, categories and/or tags. Each item exported is one charged event. |
| `maxItemsPerType` | integer | no | `1000` | Export at most this many posts (and, separately, pages, categories, tags) from each site. |
| `maxItems` | integer | no | `10000` | Stop after exporting this many items across all sites. |
| `publishedAfter` | string | no | — | Posts and pages only: published after this date (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SS in the site's time zone). |
| `publishedBefore` | string | no | — | Posts and pages only: published before this date (same format). |
| `search` | string | no | — | Only items matching this text, using the site's own WordPress search (title and content for posts/pages, name for categories/tags). |
| `order` | string | no | `"newest"` | Posts and pages: newest first or oldest first. |
| `includeContent` | boolean | no | `true` | Add the full post/page body as HTML and plain text, plus a word count. Turn off for a lighter catalogue (titles, links, dates, excerpts, categories). |

### Limits & honest notes

- Works with WordPress sites whose REST API is publicly readable, which is the WordPress default. Sites that switched it off, require a login for it, or block it with a security plugin or firewall get one free row with the reason (for example rest_login_required). Nothing is charged for them.
- robots.txt is respected (RFC 9309). If a site disallows /wp-json/, it is skipped with a free 'robots-disallowed' row, and the actor does not fall back to the ?rest_route= address. If a site's robots.txt can't be fetched (HTTP 5xx or a network error, after one retry), that site is skipped too. Crawl-delay is honoured up to 10 seconds between requests, so a large site with a long crawl delay takes a few minutes.
- Exports public, published content only: no drafts, private posts, comments, media library or user accounts. The author field is the public byline name only; author bios, emails and profile URLs are never exported.
- Password-protected posts are listed with their title, date and link, but no excerpt or body (isPasswordProtected is true).
- Custom post types (products, events, portfolio items) and custom taxonomies are not exported; only posts, pages, categories and tags.
- Full content is the HTML WordPress renders for the post body, capped at 200,000 characters per item. Shortcodes from page builders may appear as rendered markup. Excerpts are plain text up to 1,000 characters.
- Dates are taken from WordPress's GMT fields and returned in UTC. The date filters are applied by WordPress and are read in the site's own time zone.
- The search filter uses the site's built-in WordPress search, so results match what the site's own search box returns.
- Respects your run budget: set a maximum total charge and the run stops cleanly at the cap, with no item charged twice.

### Related ActorForge actors

- [RSS Feed Reader](https://apify.com/actor-forge/rss-feed-reader) — the latest items from any site's feed
- [Sitemap Extractor](https://apify.com/actor-forge/sitemap-extractor) — every URL a site lists, WordPress or not
- [Website to Markdown](https://apify.com/actor-forge/website-to-markdown)

### Changelog

- **2026-11-12** — Initial release: posts, pages, categories and tags from any WordPress site via its public REST API, with automatic API discovery (/wp-json/, advertised API link, ?rest_route=), date and search filters, robots.txt and Crawl-delay support, and free explanation rows for sites that can't be exported.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `siteUrls` (type: `array`):

Home page URLs of WordPress sites, e.g. example.com, or example.com/blog for a sub-directory install. The REST API (/wp-json/) is found automatically. Sites that turned the API off, or whose robots.txt disallows it, get one free row explaining why.

## `contentTypes` (type: `array`):

Posts, pages, categories and/or tags. Each item exported is one charged event.

## `maxItemsPerType` (type: `integer`):

Export at most this many posts (and, separately, pages, categories, tags) from each site.

## `maxItems` (type: `integer`):

Stop after exporting this many items across all sites.

## `publishedAfter` (type: `string`):

Posts and pages only: published after this date (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SS in the site's time zone).

## `publishedBefore` (type: `string`):

Posts and pages only: published before this date (same format).

## `search` (type: `string`):

Only items matching this text, using the site's own WordPress search (title and content for posts/pages, name for categories/tags).

## `order` (type: `string`):

Posts and pages: newest first or oldest first.

## `includeContent` (type: `boolean`):

Add the full post/page body as HTML and plain text, plus a word count. Turn off for a lighter catalogue (titles, links, dates, excerpts, categories).

## Actor input object example

```json
{
  "siteUrls": [
    "https://wordpress.org/news"
  ],
  "contentTypes": [
    "posts"
  ],
  "maxItemsPerType": 20,
  "maxItems": 10000,
  "order": "newest",
  "includeContent": true
}
```

# Actor output Schema

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

One row per exported post, page, category or tag, plus one free row per site that could not be exported.

## `summary` (type: `string`):

Per-site results: API root found, items available and exported per type, and problems (never charged).

# 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 = {
    "siteUrls": [
        "https://wordpress.org/news"
    ],
    "contentTypes": [
        "posts"
    ],
    "maxItemsPerType": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/wordpress-posts-exporter").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 = {
    "siteUrls": ["https://wordpress.org/news"],
    "contentTypes": ["posts"],
    "maxItemsPerType": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/wordpress-posts-exporter").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 '{
  "siteUrls": [
    "https://wordpress.org/news"
  ],
  "contentTypes": [
    "posts"
  ],
  "maxItemsPerType": 20
}' |
apify call actor-forge/wordpress-posts-exporter --silent --output-dataset

```

## MCP server setup

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

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/62g7Huytl6IQtYNp9/builds/wD3I9eCrYNntfQcdV/openapi.json
