# Blogs Search Scraper (`outspoken_strategy/blogs-search-scraper`) Actor

Search blog posts by keyword across WordPress.com/Jetpack blogs and Medium, and export them as structured data: title, description, author, blog name, published date and post URL. Supports multiple keywords, per-keyword limits and a recency window.

- **URL**: https://apify.com/outspoken\_strategy/blogs-search-scraper.md
- **Developed by:** [code craker](https://apify.com/outspoken_strategy) (community)
- **Categories:** News, Social media, Other
- **Stats:** 5 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.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/platform/actors/running/actors-in-store#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

## Blogs Search Scraper

Apify actor that searches **blog posts by keyword** and exports them as structured data. It queries two sources per keyword, with no browser and no API keys:

- **WordPress.com / Jetpack blogs** — full-text keyword search via the public WordPress.com Reader search API (`public-api.wordpress.com/rest/v1.1/read/search`). Covers millions of WordPress.com-hosted and Jetpack-connected self-hosted blogs.
- **Medium** — the latest posts tagged with the keyword, via Medium's public tag RSS feed (`medium.com/feed/tag/<keyword>`).

Results from all keywords and sources are combined and de-duplicated by post URL.

### Input

| Field | Type | Description |
|---|---|---|
| `searchQuery` | string | Keyword/phrase to search. Several keywords can be pasted one per line. `query` is accepted as an alias. |
| `queries` | array | Multiple keywords — each searched separately. |
| `maxItems` | integer | Max posts per keyword **per source** (default 20, max 100). |
| `sources` | array | `["wordpress", "medium"]` (default both). |
| `timePeriod` | string | Recency window, e.g. `1d`, `7d`, `4w`, `3m`, `1y`. Older posts are dropped. Empty = no restriction. |
| `language` | string | Accepted for input compatibility with the other search actors; currently a no-op. |

### Output

One dataset item per blog post:

```json
{
    "title": "The Bizarre World of Artificial Intelligence!",
    "description": "Plain-text excerpt of the post (≤500 chars)...",
    "blogUrl": "http://storyempire.com/2026/08/06/the-bizarre-world-of-artificial-intelligence/",
    "articleUrl": "http://storyempire.com/2026/08/06/the-bizarre-world-of-artificial-intelligence/",
    "author": "Beem Weeks",
    "source": "Story Empire",
    "sourceUrl": "http://storyempire.com",
    "publishedAt": "2026-08-06T04:05:59.000Z",
    "publishedAtRaw": "2026-08-06T00:05:59-04:00",
    "image": "https://.../featured.jpg",
    "blogPlatform": "wordpress",
    "searchQuery": "artificial intelligence",
    "scrapedAt": "2026-08-12T13:30:00.000Z"
}
```

`articleUrl` is an alias of `blogUrl` kept for output-shape compatibility with the `google-news-scraper` actor, so downstream consumers can treat both datasets the same way.

### Local run

```bash
npm install
echo '{ "searchQuery": "artificial intelligence", "maxItems": 5 }' > storage/key_value_stores/default/INPUT.json
npm start
```

### Deploy

Push to Apify as `outspoken_strategy/blogs-search-scraper` (e.g. `apify push`, or via the console's GitHub integration like the other `outspoken_strategy/*` actors).

# Actor input Schema

## `searchQuery` (type: `string`):

Keyword/phrase to search blogs for. You can also paste several keywords, one per line, to search them all. "query" is accepted as an alias.

## `queries` (type: `array`):

Multiple keywords/phrases to search — each is searched separately and results are combined and de-duplicated by post URL. maxItems applies PER keyword PER source.

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

Maximum number of blog posts to return per keyword per source (each source serves at most ~100).

## `sources` (type: `array`):

Which blog platforms to search. "wordpress" is a full-text keyword search across WordPress.com and Jetpack-connected blogs; "medium" fetches the latest Medium posts tagged with the keyword.

## `timePeriod` (type: `string`):

Restrict results to a recent window, e.g. "1d", "7d", "30d", "1y". Posts older than the window are dropped. Leave empty for no restriction.

## `language` (type: `string`):

Accepted for input compatibility with the other search actors; blog sources do not support language filtering, so this is currently a no-op.

## Actor input object example

```json
{
  "searchQuery": "artificial intelligence",
  "queries": [],
  "maxItems": 20,
  "sources": [
    "wordpress",
    "medium"
  ],
  "language": "en"
}
```

# Actor output Schema

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

All scraped blog posts as JSON dataset items — one item per post, de-duplicated by post URL. See the dataset schema for the item fields.

# 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 = {
    "searchQuery": "artificial intelligence",
    "queries": [],
    "sources": [
        "wordpress",
        "medium"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("outspoken_strategy/blogs-search-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 = {
    "searchQuery": "artificial intelligence",
    "queries": [],
    "sources": [
        "wordpress",
        "medium",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("outspoken_strategy/blogs-search-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 '{
  "searchQuery": "artificial intelligence",
  "queries": [],
  "sources": [
    "wordpress",
    "medium"
  ]
}' |
apify call outspoken_strategy/blogs-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,outspoken_strategy/blogs-search-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/jiW1mbvaS2F4MQjQw/builds/3ITQEjZ7XZOBABHre/openapi.json
