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

The WordPress Articles Scraper is an Apify actor that extracts posts and metadata from any WordPress website using the WordPress REST API. It automatically handles pagination and fetches additional information like author details, categories, tags, and featured images.

- **URL**: https://apify.com/extremescrapes/wordpress-articles-scraper.md
- **Developed by:** [Extreme Scrapes](https://apify.com/extremescrapes) (community)
- **Categories:** Automation, E-commerce, News
- **Stats:** 142 total users, 3 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$80.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## WordPress Articles Scraper

### Overview

The **WordPress Articles Scraper** is an Apify actor that extracts posts and metadata from any WordPress website using the WordPress REST API. It automatically handles pagination and fetches additional information like author details, categories, tags, and featured images.

This actor is perfect for researchers, content aggregators, and developers who need structured data from WordPress sites.

### How It Works

1. You provide the WordPress URL.
2. The actor fetches posts, handling pagination automatically.
3. If a search keyword is provided, it filters results accordingly.
4. It extracts metadata such as author name, categories, tags, and featured images.
5. The final structured JSON output includes all relevant post details.

### Features

✅ Fetches posts from any WordPress site
✅ Supports pagination until all posts are retrieved
✅ Filters posts based on search terms
✅ Extracts metadata like author, categories, tags, and featured images
✅ Provides clean and structured JSON output

### Getting Started

#### 1. Input Parameters

To use the scraper, provide the following inputs:

| Parameter            | Type    | Required | Description |
|----------------------|--------|----------|-------------|
| `startUrls`         | Array  | ✅       | List of URLs to start crawling from (e.g., `[{"url": "https://example.com/", "method": "GET"}]`). |

#### 2. Running the Actor

You can run the actor directly on Apify or via API:

##### **Using Apify Interface**

1. Navigate to the actor's Apify page.
2. Enter the required parameters.
3. Click **Run** and wait for the data to be scraped.

##### **Using Apify API**

```bash
curl -X POST -H "Content-Type: application/json" \
     -d '{"maxRequestsPerCrawl": 1, "perPage": 10, "startUrls": [{"url": "https://example.com/", "method": "GET"}]}' \
     "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs?token=YOUR_API_TOKEN"
```

### Output Format

The output is a JSON dataset containing structured post details:

```json
[
    {
        "id": 123,
        "date": "2025-03-28T12:00:00",
        "modified": "2025-03-28T14:00:00",
        "slug": "example-post",
        "link": "https://example.com/example-post",
        "title": "Example Post Title",
        "content": "<p>This is an example post content...</p>",
        "excerpt": "This is a short summary...",
        "author": "John Doe",
        "categories": ["Technology", "News"],
        "tags": ["AI", "Programming"],
        "featured_image": "https://example.com/wp-content/uploads/featured-image.jpg",
        "extra_metadata": {
            "author_bio": "John Doe is a technology journalist...",
            "category_description": "Latest news in tech industry..."
        }
    }
]
```

### Use Cases

- **Content Aggregation** – Collect and analyze posts from different WordPress sites.
- **SEO Research** – Extract content and metadata for SEO analysis.
- **Data Science** – Gather datasets for NLP or sentiment analysis.
- **Backup and Archiving** – Store blog content for future reference.

### Support & Contributions

If you encounter any issues or have feature requests, feel free to open an issue or contribute to the project. Happy scraping! 🚀

# Actor input Schema

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

URLs to start with.

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

Maximum number of requests that can be made by this crawler.

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

Number of articles per page.

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

Offset for pagination.

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

Filter by category names.

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

Filter by tag names.

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

Search articles by title keyword.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://wordpress.org/news"
    }
  ],
  "maxRequestsPerCrawl": 1,
  "perPage": 100,
  "offset": 0
}
```

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

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

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

```

## MCP server setup

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