# WordPress Posts & Pages Scraper (`springlike_meadowland/wordpress-content-scraper`) Actor

Export public WordPress posts and pages as clean text and original HTML for content migration, audit, and research.

- **URL**: https://apify.com/springlike\_meadowland/wordpress-content-scraper.md
- **Developed by:** [Akshay Aggarwal](https://apify.com/springlike_meadowland) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 content items

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 & Pages Scraper

Export a site's public WordPress posts and pages for a content migration, audit, or research project. Each result has the original rendered HTML, readable text, permalink, WordPress ID, type, publication and modification dates, and public author/category/tag details when available.

### Quick start

```json
{"siteUrls":["https://wordpress.org/news"],"contentTypes":["posts","pages"],"maxItemsPerSite":2}
```

Example public post from WordPress.org News (preview shortened for readability; dataset rows contain the full rendered HTML and text):

```json
{"id":21731,"type":"post","site_url":"https://wordpress.org/news","url":"https://wordpress.org/news/2026/09/wordpress-7-1-2-release/","title":"WordPress 7.1.2 Release","content_html":"<p class=\"wp-block-paragraph\">This security release features a fix for a critical severity security vulnerability.</p>...","content_text":"This security release features a fix for a critical severity security vulnerability. ...","excerpt":"","published_at":"2026-09-22T14:01:20","modified_at":"2026-09-23T14:04:10"}
```

See `example-output.json` for a complete public page row.

### Scope and limits

- Reads only anonymous `GET /wp-json/wp/v2/posts` and `pages` with `status=publish`, through HTTPS. A site must expose those standard REST routes at the supplied site URL. Custom content types and REST-disabled sites are outside scope.
- Accepts 1–10 sites, posts/pages selection, a total saved-item cap of 1–5000 per site (default 10), and optional `after`/`before` ISO 8601 publication filters. WordPress may apply site-specific filtering, access controls, and rate limits. The Actor stops at its item, request, time, or spending limit; large requests may be partial.
- Skips items with protected content or excerpts, non-published status, invalid links, or duplicate type/ID. It never authenticates, requests drafts/private items, supplies passwords, or downloads images/media. It preserves the source's `date` and `modified` strings without timezone conversion.
- Author and taxonomy names depend on public embedded metadata. Where public IDs exist but names do not, IDs are retained. Missing fields are omitted or null. `content_html` is original rendered HTML; `content_text`, title, and excerpt remove tags and decode entities. The Actor does not execute HTML or fetch linked assets.
- The dataset contains only saved result rows. `OUTPUT` in the default key-value store records fetched, saved, skipped, errors, limits, request count, and unprocessed sites. A missing REST route or other source error appears there; results already saved remain available.

### Billing

One `content-item` event represents one saved post or page in the dataset. The Actor stops adding rows when the event spending limit is reached. Fetches, skips, errors, and summary entries are not billable result rows. Check the Actor's current price in Apify before running it.

### Output fields

`id`, `type`, `site_url`, `url`, `title`, `content_html`, `content_text`, `excerpt`, `published_at`, `modified_at`; optional `author`, `categories`, and `tags` when public. IDs are unique within a site and content type; use `(site_url, type, id)` as a stable cross-site key.

This Actor is independent of WordPress and uses the public [Posts](https://developer.wordpress.org/rest-api/reference/posts/), [Pages](https://developer.wordpress.org/rest-api/reference/pages/), and [Pagination](https://developer.wordpress.org/rest-api/using-the-rest-api/pagination/) API contracts.

# Actor input Schema

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

HTTPS site home URLs, including the install path when applicable. 1 to 10 sites.

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

Choose posts, pages, or both.

## `maxItemsPerSite` (type: `integer`):

Total saved posts and pages per site; default 10, maximum 5000.

## `after` (type: `string`):

Optional ISO 8601 publication date filter.

## `before` (type: `string`):

Optional ISO 8601 publication date filter.

## Actor input object example

```json
{
  "siteUrls": [
    "https://wordpress.org/news"
  ],
  "contentTypes": [
    "posts",
    "pages"
  ],
  "maxItemsPerSite": 10
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "siteUrls": [
        "https://wordpress.org/news"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("springlike_meadowland/wordpress-content-scraper").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"] }

# Run the Actor and wait for it to finish
run = client.actor("springlike_meadowland/wordpress-content-scraper").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"
  ]
}' |
apify call springlike_meadowland/wordpress-content-scraper --silent --output-dataset

```

## MCP server setup

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

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/2jSHjQFdAFKOZNFIX/builds/dnXYcYgxiYquAe6rM/openapi.json
