# DEV.to Posts Scraper — Tag, Search, Top & User (No API Key) (`gochujang/devto-posts-scraper`) Actor

Scrape DEV.to articles by tag, search query, top posts, or username. Uses DEV.to's public API — no API key required. Outputs title, author, tags, reactions, comments, reading time, and more. PPE $0.002/post.

- **URL**: https://apify.com/gochujang/devto-posts-scraper.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## DEV.to Posts Scraper

Scrape articles from [DEV.to](https://dev.to) — the popular developer blogging platform — using the **public REST API with no API key required**. Collect articles by tag, search query, trending/top posts, or a specific author's profile.

### Features

- **By Tag** — Fetch latest articles for any tag (e.g. `python`, `javascript`, `webdev`, `rust`)
- **Search** — Full-text search across all DEV.to articles
- **Top / Trending** — Most popular articles over the last 7, 30, or 365 days
- **By Username** — All published articles by a specific DEV.to author
- **No API key needed** — Uses DEV.to's public API endpoint
- **Pagination** — Automatically pages through results up to your specified limit

### Use Cases

- **Content research** — Find trending developer articles on any technology
- **Competitive analysis** — Monitor what your competitors or top authors publish
- **Newsletter curation** — Aggregate the best weekly posts on a topic
- **Data science** — Build datasets of developer-written technical content
- **SEO research** — Discover high-performing content ideas in your niche

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `tag` | Scraping mode: `tag`, `search`, `top`, `user` |
| `tag` | string | `python` | Tag to scrape (mode=tag) |
| `searchQuery` | string | — | Search terms (mode=search) |
| `username` | string | — | DEV.to username (mode=user) |
| `topDays` | integer | `7` | Days for trending articles: 7, 30, or 365 (mode=top) |
| `maxPosts` | integer | `100` | Maximum articles to collect (max 1000) |

### Output

Each article is saved as a JSON record:

```json
{
  "id": 123456,
  "title": "Build a REST API with FastAPI",
  "slug": "build-a-rest-api-with-fastapi-abc1",
  "url": "https://dev.to/author/build-a-rest-api-with-fastapi-abc1",
  "author": "johndoe",
  "tags": ["python", "fastapi", "tutorial"],
  "published_at": "2026-09-01T10:00:00Z",
  "reading_time_minutes": 8,
  "reactions": 142,
  "comments": 23,
  "cover_image": "https://media.dev.to/cdn-cgi/image/...",
  "description": "Learn how to build a production-ready REST API..."
}
```

### Pricing

This Actor uses Pay-Per-Event (PPE) pricing:

- **$0.005** — One-time charge per run
- **$0.002** — Per article scraped

**Example**: Collecting 100 articles = $0.005 + (100 × $0.002) = **$0.205**

### Example Inputs

**Trending Python articles (last 7 days):**

```json
{ "mode": "top", "topDays": 7, "maxPosts": 50 }
```

**Search for AI/ML tutorials:**

```json
{ "mode": "search", "searchQuery": "machine learning tutorial", "maxPosts": 100 }
```

**All articles tagged "webdev":**

```json
{ "mode": "tag", "tag": "webdev", "maxPosts": 200 }
```

**Articles by a specific author:**

```json
{ "mode": "user", "username": "ben", "maxPosts": 50 }
```

### Notes

- DEV.to API rate limit: ~30 requests per 30 seconds. This Actor respects the limit automatically.
- The public API returns up to 30 articles per page; the Actor paginates automatically.
- `reactions` reflects public (positive) reactions on each article.

# Actor input Schema

## `mode` (type: `string`):

Scraping mode: tag (articles by tag), search (full-text search), top (trending articles), user (articles by username).

## `tag` (type: `string`):

DEV.to tag to scrape articles for (e.g. python, javascript, webdev). Used when mode=tag.

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

Search terms to find articles. Used when mode=search.

## `username` (type: `string`):

DEV.to username whose articles to scrape (e.g. ben, jess). Used when mode=user.

## `topDays` (type: `integer`):

Number of days to look back for trending articles. Used when mode=top. Common values: 7, 30, 365.

## `maxPosts` (type: `integer`):

Maximum number of articles to collect. Max 1000.

## Actor input object example

```json
{
  "mode": "tag",
  "tag": "python",
  "searchQuery": "",
  "username": "",
  "topDays": 7,
  "maxPosts": 100
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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