# WordPress Posts Scraper (`properscraper/wordpress-posts-scraper`) Actor

Export the posts or pages of any WordPress site: title, full text, date, author, categories, tags and featured image. Uses the site's public WordPress REST API, so it is fast and returns clean structured content.

- **URL**: https://apify.com/properscraper/wordpress-posts-scraper.md
- **Developed by:** [jake mcclure](https://apify.com/properscraper) (community)
- **Categories:** SEO 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.20 / 1,000 post saveds

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 Scraper

Export the posts or pages of any WordPress site. For each post you get the title, full text, excerpt, publication date, author, categories, tags, featured image and link.

It uses the public REST API that WordPress sites provide, so it is fast and returns clean, structured content instead of scraped web pages. No login and no API key are needed.

Use it to:

- export a whole blog as JSON, CSV or Excel
- feed articles into a search index, a knowledge base or an AI model
- monitor what competitors and industry blogs publish
- migrate or back up content from a WordPress site

### Input

| Field | What it does |
|---|---|
| **WordPress sites** | One site per line: `wordpress.org/news`, `https://techcrunch.com`. Include the folder if the blog lives in one. |
| **Maximum posts per site** | Stop after this many posts for each site, newest first. Default 100. |
| **What to export** | Posts, or the site's static pages. |
| **Include the full text** | Return each post's full text as plain text. On by default. |
| **Include the HTML** | Also return each post's content as HTML. |
| **Published on or after** | Only posts from this date onwards. |
| **Search for** | Only posts matching a word or phrase, using the site's own search. |

```json
{
    "sites": ["https://wordpress.org/news", "techcrunch.com"],
    "maxPostsPerSite": 200,
    "postedAfter": "2026-01-01",
    "search": "security"
}
```

### Output

One record per post, newest first:

```json
{
    "site": "https://wordpress.org/news",
    "postId": 21919,
    "type": "post",
    "url": "https://wordpress.org/news/2026/11/wc-asia-2027-penang/",
    "slug": "wc-asia-2027-penang",
    "title": "WordCamp Asia 2027 Is Coming to Penang",
    "excerpt": "Next year, WordCamp Asia 2027 heads to Penang, Malaysia.",
    "text": "Next year, WordCamp Asia 2027 heads to Penang, Malaysia. From April 9 to 11, ...",
    "publishedAt": "2026-11-11T14:00:00.000Z",
    "modifiedAt": "2026-11-10T18:42:18.000Z",
    "authorName": "Nicholas Garofalo",
    "authorUrl": "https://profiles.wordpress.org/eidolonnight/",
    "categories": ["Community", "Events"],
    "tags": [],
    "featuredImageUrl": "https://wordpress.org/news/files/2026/11/image.png",
    "sticky": false,
    "scrapedAt": "2026-11-12T09:00:00.000Z"
}
```

- `site` is the line of input the post was found under.
- `text` is the post's content as plain text, keeping paragraph and list breaks. It is left out when **Include the full text** is off.
- `html` is added when **Include the HTML** is on.
- `authorName` is empty for sites that hide their authors from the API.

A `SUMMARY` record in the run's key-value store lists, for each site, how many posts were saved and any error.

### Pricing

Pay per result. You are charged once for each post or page saved to the dataset, at the per-result price shown on this page.

Sites that cannot be read cost nothing. The run stops as soon as it reaches the maximum charge you set for it.

### Limits

- The site must run WordPress and leave its public API switched on. Most do. Some sites switch it off or put it behind a login; those are reported in the log and the summary, and cost nothing.
- Only published, public posts are returned. Drafts, private posts and password-protected content are not.
- Content added by page-builder plugins outside the normal post body may be missing from `text`.
- **Search for** uses the site's own search, so results depend on how that site searches.
- Requests to each site are spaced out. If a site asks the Actor to slow down, it waits, and stops reading that site if the limit persists.

### Is this allowed?

The Actor reads the public API that the site itself provides for programs to read its published content. It does not log in and does not read anything that is not already public. You are responsible for how you use the content, including respecting its copyright.

# Actor input Schema

## `sites` (type: `array`):

One site per line, such as wordpress.org/news or https://techcrunch.com. Include the folder if the blog lives in one (example.com/blog).

## `maxPostsPerSite` (type: `integer`):

Stop after this many posts for each site, newest first.

## `contentType` (type: `string`):

Blog posts, or the site's static pages (About, Contact and so on).

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

Return the full text of each post as plain text. Turn off to get titles, excerpts, dates and links only.

## `includeHtml` (type: `boolean`):

Also return each post's content as HTML, with its formatting, links and images.

## `postedAfter` (type: `string`):

Only return posts published from this date onwards (YYYY-MM-DD, in the site's own time zone).

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

Only return posts that match this word or phrase, using the site's own search.

## Actor input object example

```json
{
  "sites": [
    "https://wordpress.org/news"
  ],
  "maxPostsPerSite": 100,
  "contentType": "posts",
  "includeContent": true,
  "includeHtml": false
}
```

# Actor output Schema

## `posts` (type: `string`):

Every post or page saved by the run, one record each.

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

Totals for the run and, for each site, how many results were saved and any error.

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

// Run the Actor and wait for it to finish
const run = await client.actor("properscraper/wordpress-posts-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 = { "sites": ["https://wordpress.org/news"] }

# Run the Actor and wait for it to finish
run = client.actor("properscraper/wordpress-posts-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 '{
  "sites": [
    "https://wordpress.org/news"
  ]
}' |
apify call properscraper/wordpress-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,properscraper/wordpress-posts-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/nVgtWgPBOcbc316Zc/builds/nWz3eNI94p3JJjmnE/openapi.json
