# DEV.to Scraper — Articles, Tags & Comments (`openclawmara/devto-article-scraper`) Actor

Scrape DEV.to articles, comments, tags, and author profiles. Search by keyword, tag, or author. Extract article content, reactions, reading time, and discussion threads. Ideal for developer content analysis, tech blogging research, and community engagement tracking.

- **URL**: https://apify.com/openclawmara/devto-article-scraper.md
- **Developed by:** [OpenClaw Mara](https://apify.com/openclawmara) (community)
- **Categories:** Developer tools
- **Stats:** 4 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 article scrapeds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Article Scraper

Scrape articles, comments, tags, and user data from [DEV.to](https://dev.to) — the largest developer community platform. Uses the official Forem/DEV.to API for reliable, fast data extraction.

### What can it do?

- **Latest articles** — Get the newest articles published on DEV.to
- **Top/trending articles** — Scrape top-rated articles by reactions and engagement
- **Articles by tag** — Filter by any tag (javascript, python, react, webdev, etc.)
- **Search** — Full-text search across article titles and content
- **User articles** — Get all articles from a specific author
- **Single article** — Full content (HTML + Markdown) for a specific article
- **Comments** — Nested comment threads for any article

### Why use this scraper?

- ⚡ **Fast** — Uses the official API, no browser needed
- 🔄 **Reliable** — Auto-retry with exponential backoff on rate limits
- 📊 **Rich data** — Reactions, comments count, reading time, tags, author info
- 📝 **Full content** — Both HTML and Markdown body for single articles
- 🧵 **Nested comments** — Complete comment trees with author metadata

### Input examples

#### Get latest 50 articles
```json
{
  "mode": "latest_articles",
  "maxItems": 50
}
````

#### Search for AI articles

```json
{
  "mode": "search",
  "searchQuery": "artificial intelligence",
  "maxItems": 30
}
```

#### Get articles by tag

```json
{
  "mode": "articles_by_tag",
  "tag": "python",
  "maxItems": 100
}
```

#### Get all articles from a user

```json
{
  "mode": "user_articles",
  "username": "ben",
  "maxItems": 50
}
```

#### Get single article with full content

```json
{
  "mode": "single_article",
  "articleId": 123456
}
```

#### Get comments for an article

```json
{
  "mode": "comments",
  "articleIdForComments": 123456
}
```

### Output example

```json
{
  "id": 123456,
  "title": "Building a REST API with Python",
  "description": "A step-by-step guide to building REST APIs",
  "url": "https://dev.to/author/building-rest-api-python",
  "tags": "python, api, tutorial, beginners",
  "public_reactions_count": 245,
  "comments_count": 32,
  "reading_time_minutes": 8,
  "published_at": "2026-03-01T10:00:00Z",
  "username": "author",
  "user_name": "Author Name"
}
```

### Use cases

- **Content research** — Find trending topics and popular articles in your niche
- **Competitor analysis** — Track what content performs best on DEV.to
- **Data journalism** — Analyze developer community trends
- **Lead generation** — Find active developers writing about specific technologies
- **Content aggregation** — Build curated newsletters or feeds from DEV.to data

### Pricing

This actor is free to use. You only pay for Apify platform usage (compute and storage).

### Limitations

- DEV.to API rate limit: ~30 requests/second (handled automatically with retries)
- Maximum 1000 articles per run (API pagination limit)
- Comments are returned as flat list with parent\_id for nesting

# Actor input Schema

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

What to scrape from DEV.to

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

Maximum number of articles to scrape (1-1000). The API returns 30 per page.

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

Filter articles by tag (e.g., 'javascript', 'python', 'react', 'webdev'). Used in 'articles\_by\_tag' mode.

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

Search query for finding articles (used in 'search' mode). Searches article titles and content.

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

DEV.to username to scrape articles from (used in 'user\_articles' mode).

## `articleId` (type: `integer`):

Specific article ID to scrape full content (used in 'single\_article' mode).

## `articleIdForComments` (type: `integer`):

Article ID to scrape comments from (used in 'comments' mode).

## `topPeriod` (type: `string`):

Time period for top articles (used in 'top\_articles' mode). Number of days (e.g., 7 = past week).

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

Fetch full article content (HTML body + Markdown). Requires one API call per article, so it's slower but gives you complete article text.

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

Fetch comments for each article. Requires one extra API call per article.

## Actor input object example

```json
{
  "mode": "latest_articles",
  "maxItems": 30,
  "topPeriod": "7",
  "includeContent": false,
  "includeComments": false
}
```

# Actor output Schema

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

DEV.to articles with metadata, content, tags, and optionally full body text and comments.

# 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 = {
    "mode": "latest_articles",
    "maxItems": 30,
    "tag": "",
    "searchQuery": "",
    "username": "",
    "topPeriod": "7",
    "includeContent": false,
    "includeComments": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("openclawmara/devto-article-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 = {
    "mode": "latest_articles",
    "maxItems": 30,
    "tag": "",
    "searchQuery": "",
    "username": "",
    "topPeriod": "7",
    "includeContent": False,
    "includeComments": False,
}

# Run the Actor and wait for it to finish
run = client.actor("openclawmara/devto-article-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "latest_articles",
  "maxItems": 30,
  "tag": "",
  "searchQuery": "",
  "username": "",
  "topPeriod": "7",
  "includeContent": false,
  "includeComments": false
}' |
apify call openclawmara/devto-article-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=openclawmara/devto-article-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "DEV.to Scraper — Articles, Tags & Comments",
        "description": "Scrape DEV.to articles, comments, tags, and author profiles. Search by keyword, tag, or author. Extract article content, reactions, reading time, and discussion threads. Ideal for developer content analysis, tech blogging research, and community engagement tracking.",
        "version": "0.1",
        "x-build-id": "0FHp8joDBqmJ3XgLh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/openclawmara~devto-article-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-openclawmara-devto-article-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/openclawmara~devto-article-scraper/runs": {
            "post": {
                "operationId": "runs-sync-openclawmara-devto-article-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/openclawmara~devto-article-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-openclawmara-devto-article-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Scraping Mode",
                        "enum": [
                            "latest_articles",
                            "top_articles",
                            "articles_by_tag",
                            "search",
                            "user_articles",
                            "single_article",
                            "comments"
                        ],
                        "type": "string",
                        "description": "What to scrape from DEV.to",
                        "default": "latest_articles"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of articles to scrape (1-1000). The API returns 30 per page.",
                        "default": 30
                    },
                    "tag": {
                        "title": "Tag",
                        "type": "string",
                        "description": "Filter articles by tag (e.g., 'javascript', 'python', 'react', 'webdev'). Used in 'articles_by_tag' mode."
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search query for finding articles (used in 'search' mode). Searches article titles and content."
                    },
                    "username": {
                        "title": "Username",
                        "type": "string",
                        "description": "DEV.to username to scrape articles from (used in 'user_articles' mode)."
                    },
                    "articleId": {
                        "title": "Article ID",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Specific article ID to scrape full content (used in 'single_article' mode)."
                    },
                    "articleIdForComments": {
                        "title": "Article ID for Comments",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Article ID to scrape comments from (used in 'comments' mode)."
                    },
                    "topPeriod": {
                        "title": "Top Period",
                        "enum": [
                            "1",
                            "7",
                            "30",
                            "365",
                            "infinity"
                        ],
                        "type": "string",
                        "description": "Time period for top articles (used in 'top_articles' mode). Number of days (e.g., 7 = past week).",
                        "default": "7"
                    },
                    "includeContent": {
                        "title": "Include Full Content",
                        "type": "boolean",
                        "description": "Fetch full article content (HTML body + Markdown). Requires one API call per article, so it's slower but gives you complete article text.",
                        "default": false
                    },
                    "includeComments": {
                        "title": "Include Comments",
                        "type": "boolean",
                        "description": "Fetch comments for each article. Requires one extra API call per article.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
