# WordPress Articles Scraper (`w3crawler/wordpress-articles-scraper`) Actor

Bounded public WordPress REST API v2 Actor that extracts source-backed articles, embedded metadata, and truthful access diagnostics.

- **URL**: https://apify.com/w3crawler/wordpress-articles-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 articles

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Articles Scraper

**WordPress Articles Scraper** reads public posts through a WordPress site's documented REST API v2. Start from a site root, an installation subdirectory, or a `/wp-json/wp/v2/posts` URL; the Actor saves one row per post with its stable ID, canonical link, title, cleaned and rendered content, excerpt, dates, author, categories, tags, featured media, content images, calculated content statistics, and optional bounded public comments. It is a lightweight, source-backed alternative to the WordPress REST API for content inventories, monitoring, research, and downstream data pipelines.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/wordpress-articles-scraper) and select **Try for free** or open the **Input** tab.
2. Add one or more public WordPress `startUrls`, then choose `maxItems`, `maxRequestsPerCrawl`, and `perPage` for the run.
3. Keep `includeDetails`, `maxDetailItems`, and `includeComments` small for the first run; detail enrichment and comments are extra requests.
4. Start the Actor, open the dataset, and export the saved articles as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to check the outcome, request counts, and whether detail or comment work failed.

### Input

`startUrls` is required. Every other field is optional; the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `startUrls` | object array | Required | `[{"url":"https://developer.wordpress.org/news/"}]` | Public WordPress site roots, installation subdirectories, or `/wp-json/wp/v2/posts` URLs. Each entry requires `url`; an optional `method` is retained for RequestList compatibility. 1–50 entries. |
| `categories` | string | Optional | Not supplied | Comma- or pipe-separated public category names or numeric IDs. Multiple values must all match. Up to 500 characters. |
| `tags` | string | Optional | Not supplied | Comma- or pipe-separated public tag names or numeric IDs. Multiple values must all match. Up to 500 characters. |
| `search` | string | Optional | Not supplied | WordPress title and content search term. Up to 200 characters. |
| `maxItems` | integer | Optional | `10` | Global cap on saved article rows across all start URLs and pages. 1–10000. |
| `maxRequestsPerCrawl` | integer | Optional | `1` | Page budget applied independently to each start URL. 1–100. |
| `perPage` | integer | Optional | `10` | Posts requested per page from the WordPress API. 1–100. |
| `offset` | integer | Optional | `0` | Posts to skip before the first page for each start URL. 0–1000000. |
| `includeDetails` | boolean | Optional | `true` | Request a separate public post-detail response for selected records. A failed detail request keeps the list record. |
| `maxDetailItems` | integer | Optional | `3` | Maximum selected records enriched with a detail request. 0–50; `0` disables enrichment. |
| `includeComments` | boolean | Optional | `false` | Keep bounded public comments when the embedded WordPress response exposes replies. |
| `maxComments` | integer | Optional | `5` | Maximum public comments retained per article when comments are enabled. 0–25. |
| `includeContentHtml` | boolean | Optional | `true` | Keep bounded rendered `contentHtml` and `excerptHtml` alongside the cleaned text fields. |
| `timeoutMs` | integer | Optional | `30000` | Maximum duration of each public REST request. 1000–120000 ms. |
| `requestDelayMs` | integer | Optional | `500` | Minimum delay between consecutive public requests. 0–10000 ms. |
| `maxResponseBytes` | integer | Optional | `5000000` | Maximum accepted REST response size. 100000–10000000 bytes. |
| `retries` | integer | Optional | `1` | Retries for transient HTTP and network errors. Access blocks are never bypassed. 0–3. |
| `userAgent` | string | Optional | Not supplied | Transparent HTTP user-agent string. 10–300 characters. |
| `proxyConfiguration` | object | Optional | Not supplied | Accepted for compatibility with existing inputs but ignored by this direct REST implementation. The Actor does not use or claim proxy rotation. |

Full default input:

```json
{
  "startUrls": [
    {
      "url": "https://developer.wordpress.org/news/"
    }
  ],
  "maxItems": 10,
  "maxRequestsPerCrawl": 1,
  "perPage": 10,
  "offset": 0,
  "includeDetails": true,
  "maxDetailItems": 3,
  "includeComments": false,
  "maxComments": 5,
  "includeContentHtml": true,
  "timeoutMs": 30000,
  "requestDelayMs": 500,
  "maxResponseBytes": 5000000,
  "retries": 1
}
```

The Actor reads only public WordPress REST API responses. It does not log in, access private posts, or fabricate missing content. `proxyConfiguration` is accepted for input compatibility only; the direct REST implementation ignores it.

### Output

The dataset contains one row per unique public article. Optional values are omitted when the source does not publish them rather than inferred, and no placeholder rows are written. A detail-enrichment failure after a list record was saved leaves that row available and marks the run `PARTIAL`.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string enum | Always | Record kind; always `wordpress-article`. |
| `sourceId` | string | Always | Stable source post identifier as a string. |
| `id` | integer | Always | WordPress post ID. |
| `siteUrl` | string | Always | Normalized public WordPress site URL. |
| `site_url` | string | Always | Backward-compatible alias of `siteUrl`. |
| `sourceUrl` | string | Always | Public REST response URL that produced the row. |
| `pageUrl` | string | Always | Configured public start URL for the page. |
| `apiUrl` | string | Always | REST API URL used for the row. |
| `api_url` | string | Always | Backward-compatible alias of `apiUrl`. |
| `sourceWebsite` | string | Always | Origin of the public WordPress site. |
| `source` | string | Always | Source family label, `public WordPress REST API v2`. |
| `provenance` | string | Always | Extraction provenance label. |
| `pageNum` | integer | Always | One-based page number within the start URL. |
| `page` | integer | Always | Backward-compatible alias of `pageNum`. |
| `position` | integer | Always | One-based position within the source page. |
| `search` | string | When `search` is supplied | Search term applied to the REST query. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |
| `slug` | string | Always | WordPress post slug. |
| `guid` | string | When published | Public WordPress GUID URL. |
| `canonicalUrl` | string | Always | Canonical public article URL. |
| `link` | string | Always | Public article URL. |
| `title` | string | Always | Cleaned article title. |
| `titleHtml` | string | Always | Rendered title value returned by WordPress. |
| `content` | string | Always | Cleaned public article text; an empty string is possible when the post body is empty. |
| `contentHtml` | string | When `includeContentHtml` is true | Bounded rendered article HTML. |
| `excerpt` | string | Always | Cleaned public excerpt. |
| `excerptHtml` | string | When `includeContentHtml` is true | Bounded rendered excerpt HTML. |
| `date` | string | When published | Publication time normalized to ISO 8601. |
| `modified` | string | When published | Last modification time normalized to ISO 8601. |
| `postType` | string | When published | WordPress post type. |
| `postStatus` | string | When published | Public WordPress post status. |
| `format` | string | When published | WordPress post format. |
| `template` | string | When exposed by the source | WordPress template slug. |
| `sticky` | boolean | When returned by the source | Whether WordPress marks the post sticky. |
| `author` | string | When published | Public author display name. |
| `authorDetails` | object | When the author is embedded | Public author ID, name, URL, profile URL, description, and avatar URLs. |
| `categories` | string array | When assigned | Public category names. |
| `tags` | string array | When assigned | Public tag names. |
| `categoryDetails` | object array | When assigned | Structured public category terms. |
| `tagDetails` | object array | When assigned | Structured public tag terms. |
| `featuredMediaId` | integer | When a featured image exists | Featured media post ID. |
| `featured_image` | string | When a featured image exists | Backward-compatible featured image URL. |
| `featuredImage` | string | When a featured image exists | Featured image URL. |
| `featuredMedia` | object | When a featured image exists | Structured featured media metadata. |
| `contentImages` | object array | When the article body contains images | Article images with URL, alt text, width, and height; known avatars and UI assets are excluded. |
| `contentStats` | object | Always | Calculated `wordCount`, `characterCount`, and `paragraphCount` from the saved content. |
| `commentCount` | integer | When public comments are embedded | Count of actual public comments in the embedded response; omitted when the source returns an embed error placeholder or no comments. |
| `comments` | object array | When `includeComments` is enabled and comments exist | Bounded public comments with ID, parent, dates, author object, content, link, status, and type. |
| `extra_metadata` | object | When compatible metadata is available | Public author ID, author bio/link, category and tag descriptions, and featured-image alt text. |

The example below shows selected fields from the real first saved row of the 2026-10-25 run. Long content, HTML, image arrays, comments, and `extra_metadata` are omitted from the example rather than shortened; the values shown are complete.

```json
{
  "recordType": "wordpress-article",
  "sourceId": "6415",
  "id": 6415,
  "siteUrl": "https://developer.wordpress.org/news",
  "site_url": "https://developer.wordpress.org/news",
  "sourceUrl": "https://developer.wordpress.org/news/wp-json/wp/v2/posts/6415?_embed=1",
  "pageUrl": "https://developer.wordpress.org/news/",
  "apiUrl": "https://developer.wordpress.org/news/wp-json/wp/v2/posts/6415?_embed=1",
  "api_url": "https://developer.wordpress.org/news/wp-json/wp/v2/posts/6415?_embed=1",
  "sourceWebsite": "https://developer.wordpress.org",
  "source": "public WordPress REST API v2",
  "provenance": "wordpress_rest_api_v2_embedded_v1",
  "pageNum": 1,
  "page": 1,
  "position": 1,
  "scrapedAt": "2026-10-25T20:46:48.045Z",
  "slug": "whats-new-for-developers-october-2026",
  "guid": "https://developer.wordpress.org/news/?p=6415",
  "canonicalUrl": "https://developer.wordpress.org/news/2026/10/whats-new-for-developers-october-2026/",
  "link": "https://developer.wordpress.org/news/2026/10/whats-new-for-developers-october-2026/",
  "title": "What’s new for developers? (October 2026)",
  "titleHtml": "What&#8217;s new for developers? (October 2026)",
  "date": "2026-10-14T19:56:09.000Z",
  "modified": "2026-10-14T19:56:25.000Z",
  "postType": "post",
  "postStatus": "publish",
  "format": "standard",
  "sticky": true,
  "author": "Justin Tadlock",
  "categories": ["Blocks", "Playground", "Plugins", "Themes"],
  "tags": ["Monthly Roundups"],
  "featuredMediaId": 6419,
  "featured_image": "https://developer.wordpress.org/news/files/2026/10/whats-new-devs-oct-2026.png",
  "featuredImage": "https://developer.wordpress.org/news/files/2026/10/whats-new-devs-oct-2026.png",
  "contentStats": {
    "wordCount": 2328,
    "characterCount": 14135,
    "paragraphCount": 1
  },
  "commentCount": 1
}
```

`authorDetails` contains `id` (integer), `name`, `url`, `profileUrl`, `description`, and `avatarUrls` (object). `categoryDetails` and `tagDetails` contain `id`, `name`, `slug`, `description`, `link`, `count`, and `taxonomy`. `featuredMedia` contains `id`, `url`, `sourceUrl`, `title`, `caption`, `altText`, `description`, `mediaType`, `mimeType`, `width`, `height`, and `fileSize`. `contentImages` contains `url`, `alt`, `width`, and `height`. `contentStats` contains `wordCount`, `characterCount`, and `paragraphCount`. `comments` contains `id`, `parent`, `date`, `modified`, `author`, `content`, `link`, `status`, and `type` when published.

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT`.

| Field | Meaning |
| --- | --- |
| `recordType` | Summary record label, `run-summary`. |
| `status` | Actor process outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `actorStatus` | Compatibility alias of `status`. |
| `dataStatus` | Completeness of saved articles: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `found` | Whether the source returned at least one usable post. |
| `dataAvailable` | Whether at least one article row was saved. |
| `source` | Public source description. |
| `provenance` | Extraction provenance label. |
| `accessPolicy` | Access boundary used for the run. |
| `sourcesVisited` | Number of start URLs that produced a usable response. |
| `pagesVisited` | Number of list pages requested. |
| `filteredOutCount` | Candidates excluded by filters or limits. |
| `itemCount` | Article rows saved to the dataset. |
| `itemsStored` | Compatibility alias of `itemCount`. |
| `articleCount` | Article rows saved in the run. |
| `diagnosticsStored` | Diagnostic dataset rows; the Actor writes none, so this is `0`. |
| `diagnosticsObserved` | Operational issues observed during the run. |
| `diagnosticCount` | Number of operational issues recorded in the summary. |
| `totalDatasetItems` | Total dataset rows after the run. |
| `failedRequestCount` | Requests that failed after retries. |
| `requests` | Public REST requests attempted. |
| `successfulRequests` | Requests that returned usable responses. |
| `failedRequests` | Requests that failed. |
| `totalRequestAttempts` | All attempts, including retries. |
| `httpStatuses` | HTTP status codes mapped to their counts. |
| `detailRequested` | Number of records selected for detail enrichment. |
| `detailSucceeded` | Detail requests that succeeded. |
| `detailFailures` | Detail requests that failed. |
| `filters` | Normalized input values and the source mode used. |
| `generatedBy` | Generator label recorded by the Actor. |
| `completedAt` | Time the summary was written, in ISO UTC. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Articles were saved without an extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Articles were saved, but a later detail or comment request failed. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | The source completed cleanly and returned no matching posts. |
| `FAILED` | `FAILED` | A fatal error occurred before any article was saved. |

Example `OUTPUT` from the 2026-10-25 run:

```json
{
  "recordType": "run-summary",
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "actorStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "found": true,
  "dataAvailable": true,
  "source": "public WordPress REST API v2",
  "provenance": "wordpress_rest_api_v2_embedded_v1",
  "accessPolicy": "Public WordPress REST API responses only; no login, private content, CAPTCHA, paywall, or access-control bypass.",
  "sourcesVisited": 1,
  "pagesVisited": 1,
  "filteredOutCount": 0,
  "itemCount": 2,
  "itemsStored": 2,
  "articleCount": 2,
  "diagnosticsStored": 0,
  "diagnosticsObserved": 0,
  "diagnosticCount": 0,
  "totalDatasetItems": 2,
  "failedRequestCount": 0,
  "requests": 3,
  "successfulRequests": 3,
  "failedRequests": 0,
  "totalRequestAttempts": 3,
  "httpStatuses": {
    "200": 3
  },
  "detailRequested": 2,
  "detailSucceeded": 2,
  "detailFailures": 0,
  "filters": {
    "startUrls": [
      "https://developer.wordpress.org/news/"
    ],
    "maxRequestsPerCrawl": 1,
    "perPage": 2,
    "offset": 0,
    "maxItems": 2,
    "timeoutMs": 30000,
    "requestDelayMs": 500,
    "maxResponseBytes": 5000000,
    "retries": 1,
    "sourceMode": "live"
  },
  "generatedBy": "OpenAI Codex with gpt-5.6-luna (max)",
  "completedAt": "2026-10-25T20:46:49.035Z"
}
```

### Coverage and limitations

The Actor discovers posts only through the public WordPress REST API v2 endpoints the target site exposes. It does not crawl the whole site, follow external article links, log in, or recover posts that the API hides. `categories` and `tags` are all-match filters; when several values are supplied, a post must carry every one of them. `maxRequestsPerCrawl` applies per start URL, while `maxItems` is global.

Detail enrichment is capped by `maxDetailItems` and only fills fields the selected post response exposes. Comments are available only when the embedded response includes actual public comments and `includeComments` is enabled; `maxComments` bounds what is retained. Some sites place a REST error object (for example `rest_forbidden_param`) in `_embedded.replies` instead of comments; in that case both `comments` and `commentCount` are omitted rather than counted as a comment. A site may disable the REST API, return a subset of fields, or block automated requests. Such outcomes are recorded in `OUTPUT` and logs; the Actor does not write diagnostic or placeholder dataset rows.

The `proxyConfiguration` field is accepted for compatibility but ignored. The Actor makes direct requests, so proxy rotation is not a supported feature. Public posts can change or be deleted after collection; saved rows reflect the response at run time.

### Usage and support

Cost depends on Apify compute, the number of list pages, detail requests, comments, retries, and response sizes. Start with `maxItems` and `maxRequestsPerCrawl` near the defaults, then increase `maxDetailItems` or `maxComments` only when you need the extra fields. Set `includeContentHtml` to `false` to reduce row size when rendered HTML is not required. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/wordpress-articles-scraper/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT` summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, endorsed by, or sponsored by WordPress or any target site. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public posts can contain personal information; use the output only for lawful purposes.

# Actor input Schema

## `startUrls` (type: `array`):

Public WordPress site roots, installation subdirectories, or /wp-json/wp/v2/posts URLs. Duplicate URLs are removed before crawling.

## `categories` (type: `string`):

Comma- or pipe-separated public category names or numeric IDs. Multiple values must all match.

## `tags` (type: `string`):

Comma- or pipe-separated public tag names or numeric IDs. Multiple values must all match.

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

WordPress title/content search term.

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

Global cap on source-backed article records across all start URLs and pages.

## `maxRequestsPerCrawl` (type: `integer`):

Bounded page budget applied independently to each start URL.

## `perPage` (type: `integer`):

Number of WordPress posts requested on each page.

## `offset` (type: `integer`):

Number of posts to skip before the first page for each start URL.

## `includeDetails` (type: `boolean`):

Fetch a bounded public post detail response for selected records. If a detail request fails, the list record is retained.

## `maxDetailItems` (type: `integer`):

Maximum selected records to enrich with a separate public post detail request.

## `includeComments` (type: `boolean`):

Include bounded public comments when the WordPress REST response exposes them.

## `maxComments` (type: `integer`):

Maximum public comments retained per article when comments are enabled.

## `includeContentHtml` (type: `boolean`):

Keep bounded rendered contentHtml and excerptHtml alongside cleaned text fields.

## `timeoutMs` (type: `integer`):

Maximum time allowed for each public REST request.

## `requestDelayMs` (type: `integer`):

Minimum delay between consecutive public requests; use respectful pacing for live sites.

## `maxResponseBytes` (type: `integer`):

Maximum REST response size accepted.

## `retries` (type: `integer`):

Retries for transient HTTP and network errors. Access blocks are never bypassed.

## `userAgent` (type: `string`):

Transparent HTTP user-agent string.

## `proxyConfiguration` (type: `object`):

Accepted for compatibility with existing inputs but ignored by this direct REST implementation. The Actor does not claim proxy rotation.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://developer.wordpress.org/news/"
    }
  ],
  "maxItems": 10,
  "maxRequestsPerCrawl": 1,
  "perPage": 10,
  "offset": 0,
  "includeDetails": true,
  "maxDetailItems": 3,
  "includeComments": false,
  "maxComments": 5,
  "includeContentHtml": true,
  "timeoutMs": 30000,
  "requestDelayMs": 500,
  "maxResponseBytes": 5000000,
  "retries": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

Run status and counters stored by the Actor.

## `sourceMetadata` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/wordpress-articles-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 = {}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/wordpress-articles-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/LjW7Bg58AZVWz1Xic/builds/1SNNpi0zUy0pD43B3/openapi.json
