# Professional Blog Writer Actor (`oneary/professional-blog-writer-actor`) Actor

- **URL**: https://apify.com/oneary/professional-blog-writer-actor.md
- **Developed by:** [Luan](https://apify.com/oneary) (community)
- **Categories:** Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

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

## Professional Blog Writer with AI Images

Create comprehensive, SEO-optimized blog articles (2000-5000 words) with AI-generated images, executive summaries, table of contents, references, and professional HTML formatting.

### Features

#### 📝 Comprehensive Article Generation
- **2000-5000 words** of high-quality, well-researched content
- **Professional structure** with H2 and H3 headings
- **Multiple tones**: Professional, Conversational, Technical, Educational, Inspirational
- **Target audience customization** for personalized content

#### 🎨 AI-Generated Images
- Generate **1-5 relevant images** using FLUX or DALL-E models
- Automatic image prompt generation based on article content
- Support for **FLUX 1.1 Pro**, **FLUX Schnell** (free), and **DALL-E 3**
- Returns actual image URLs ready to use

#### 📊 Executive Summary
- **100-150 word** professional summary
- Perfect for busy readers and social media
- Optional - can be toggled on/off

#### 🔗 Table of Contents
- **Auto-generated** from article headings
- **Clickable anchor links** for easy navigation
- Clean, professional formatting

#### 📚 References & Sources
- **5-8 authoritative sources** suggested
- Properly formatted references section
- Enhances credibility and SEO

#### 🎯 SEO Optimization
- **Meta description** (150-160 characters)
- **Natural keyword integration** throughout content
- **SEO Score** (0-100) with detailed analysis
- Optimal keyword density and structure

#### 💼 Dual Format Output
- **HTML**: Semantic HTML5 with proper tags
- **Markdown**: Clean markdown for easy editing
- Both formats included in every output

#### 📢 Call-to-Action
- Customizable CTA section
- Professional formatting
- Optional - add your own CTA text

#### 💰 Cost Tracking & Transparency
- Detailed breakdown of writing and image costs
- Automatic profit calculation
- Dynamic pricing based on length and images

### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `topic` | String | ✅ | Main topic or title for the article |
| `keywords` | Array | ✅ | SEO keywords (1-10) |
| `openrouterApiKey` | String | ✅ | Your OpenRouter API key |
| `targetAudience` | String | ❌ | Target audience (e.g., "marketing professionals") |
| `wordCount` | Integer | ❌ | Target word count (1000-5000, default: 2000) |
| `tone` | String | ❌ | Writing tone (default: "professional") |
| `includeImages` | Boolean | ❌ | Generate AI images (default: true) |
| `numberOfImages` | Integer | ❌ | Number of images (1-5, default: 3) |
| `includeTableOfContents` | Boolean | ❌ | Add TOC (default: true) |
| `includeExecutiveSummary` | Boolean | ❌ | Add summary (default: true) |
| `includeReferences` | Boolean | ❌ | Add references (default: true) |
| `includeCallToAction` | Boolean | ❌ | Add CTA (default: true) |
| `ctaText` | String | ❌ | Custom CTA text |
| `industryContext` | String | ❌ | Industry/context for the article |
| `writingModel` | String | ❌ | AI model for writing (default: "claude-3.5-sonnet") |
| `imageModel` | String | ❌ | AI model for images (default: "flux-schnell") |

### Output Structure

The actor returns a comprehensive JSON object with:

- ✅ **Article title and subtitle**
- ✅ **Executive summary**
- ✅ **Table of contents** (array of headings with anchors)
- ✅ **Full content** in HTML and Markdown
- ✅ **Meta description and keywords**
- ✅ **AI-generated image URLs**
- ✅ **Image prompts used**
- ✅ **References list**
- ✅ **Call-to-action HTML**
- ✅ **Word count and reading time**
- ✅ **SEO score (0-100)**
- ✅ **Cost breakdown** (writing + images)
- ✅ **Profit calculation**
- ✅ **Usage statistics**

### Usage Example

```json
{
  "topic": "The Future of AI in Content Marketing",
  "keywords": ["AI content", "content marketing", "automation", "SEO"],
  "targetAudience": "Marketing professionals and content creators",
  "wordCount": 2500,
  "tone": "professional",
  "includeImages": true,
  "numberOfImages": 3,
  "industryContext": "Digital Marketing",
  "writingModel": "anthropic/claude-3.5-sonnet",
  "imageModel": "black-forest-labs/flux-schnell",
  "openrouterApiKey": "YOUR_API_KEY"
}
````

### Pricing

Dynamic pricing based on article length and number of images:

- **Base**: $2.00
- **1500+ words**: +$1.00
- **2000+ words**: +$2.00
- **3000+ words**: +$3.00
- **Per image**: +$0.50

**Example**: 2500-word article with 3 images = $5.50

### Recommended AI Models

#### For Writing:

- **Claude 3.5 Sonnet** (Recommended) - Best quality, excellent for long-form content
- **GPT-4o** - Fast and reliable
- **Claude 3 Opus** - Premium quality

#### For Images:

- **FLUX Schnell** (Recommended) - Free and fast
- **FLUX 1.1 Pro** - Highest quality
- **DALL-E 3** - Premium option

### Getting Started

1. Get your OpenRouter API key from [openrouter.ai/keys](https://openrouter.ai/keys)
2. Configure the actor with your desired parameters
3. Run the actor
4. Receive a professional blog article ready to publish!

### Use Cases

- 📰 **Content Marketing**: Create engaging blog posts for your website
- 🎓 **Thought Leadership**: Establish authority in your industry
- 📈 **SEO Content**: Rank higher with optimized articles
- 📝 **Technical Documentation**: Explain complex topics clearly
- 💼 **Business Insights**: Share professional analysis and insights

### Technical Details

- **Built with**: Apify SDK, OpenRouter API
- **Node.js**: Version 18+
- **Models**: Claude, GPT-4, FLUX, DALL-E
- **Output**: HTML, Markdown, JSON

### Support

For issues or questions:

- Check the [OpenRouter documentation](https://openrouter.ai/docs)
- Review the [Apify documentation](https://docs.apify.com)

### License

Apache-2.0

***

**Created with ❤️ for professional content creators**

# Actor input Schema

## `topic` (type: `string`):

Main topic or title for the blog article

## `keywords` (type: `array`):

Target SEO keywords to include in the article

## `targetAudience` (type: `string`):

Who is this article for? (e.g., 'marketing professionals', 'small business owners')

## `wordCount` (type: `integer`):

Desired article length in words

## `tone` (type: `string`):

The tone and style of writing

## `includeImages` (type: `boolean`):

Generate relevant images using AI (FLUX/DALL-E)

## `numberOfImages` (type: `integer`):

How many AI images to generate

## `includeTableOfContents` (type: `boolean`):

Add a clickable table of contents

## `includeExecutiveSummary` (type: `boolean`):

Add an executive summary at the beginning

## `includeReferences` (type: `boolean`):

Add references and suggested sources

## `includeCallToAction` (type: `boolean`):

Add a call-to-action at the end

## `ctaText` (type: `string`):

Custom CTA text (optional)

## `industryContext` (type: `string`):

Specific industry or context for the article

## `writingModel` (type: `string`):

AI model for article writing

## `imageModel` (type: `string`):

AI model for image generation

## `openrouterApiKey` (type: `string`):

Your OpenRouter API key from https://openrouter.ai/keys

## Actor input object example

```json
{
  "wordCount": 2000,
  "tone": "professional",
  "includeImages": true,
  "numberOfImages": 3,
  "includeTableOfContents": true,
  "includeExecutiveSummary": true,
  "includeReferences": true,
  "includeCallToAction": true,
  "writingModel": "anthropic/claude-3.5-sonnet",
  "imageModel": "black-forest-labs/flux-schnell"
}
```

# 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("oneary/professional-blog-writer-actor").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("oneary/professional-blog-writer-actor").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 '{}' |
apify call oneary/professional-blog-writer-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=oneary/professional-blog-writer-actor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Professional Blog Writer Actor",
        "version": "0.0",
        "x-build-id": "nmFhHbzdCTsq8LqE2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/oneary~professional-blog-writer-actor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-oneary-professional-blog-writer-actor",
                "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/oneary~professional-blog-writer-actor/runs": {
            "post": {
                "operationId": "runs-sync-oneary-professional-blog-writer-actor",
                "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/oneary~professional-blog-writer-actor/run-sync": {
            "post": {
                "operationId": "run-sync-oneary-professional-blog-writer-actor",
                "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": [
                    "topic",
                    "keywords",
                    "openrouterApiKey"
                ],
                "properties": {
                    "topic": {
                        "title": "Article Topic",
                        "minLength": 5,
                        "type": "string",
                        "description": "Main topic or title for the blog article"
                    },
                    "keywords": {
                        "title": "SEO Keywords",
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "description": "Target SEO keywords to include in the article",
                        "items": {
                            "type": "string"
                        }
                    },
                    "targetAudience": {
                        "title": "Target Audience",
                        "type": "string",
                        "description": "Who is this article for? (e.g., 'marketing professionals', 'small business owners')"
                    },
                    "wordCount": {
                        "title": "Target Word Count",
                        "minimum": 1000,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Desired article length in words",
                        "default": 2000
                    },
                    "tone": {
                        "title": "Writing Tone",
                        "enum": [
                            "professional",
                            "conversational",
                            "technical",
                            "educational",
                            "inspirational"
                        ],
                        "type": "string",
                        "description": "The tone and style of writing",
                        "default": "professional"
                    },
                    "includeImages": {
                        "title": "Generate AI Images",
                        "type": "boolean",
                        "description": "Generate relevant images using AI (FLUX/DALL-E)",
                        "default": true
                    },
                    "numberOfImages": {
                        "title": "Number of Images",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "How many AI images to generate",
                        "default": 3
                    },
                    "includeTableOfContents": {
                        "title": "Include Table of Contents",
                        "type": "boolean",
                        "description": "Add a clickable table of contents",
                        "default": true
                    },
                    "includeExecutiveSummary": {
                        "title": "Include Executive Summary",
                        "type": "boolean",
                        "description": "Add an executive summary at the beginning",
                        "default": true
                    },
                    "includeReferences": {
                        "title": "Include References",
                        "type": "boolean",
                        "description": "Add references and suggested sources",
                        "default": true
                    },
                    "includeCallToAction": {
                        "title": "Include Call-to-Action",
                        "type": "boolean",
                        "description": "Add a call-to-action at the end",
                        "default": true
                    },
                    "ctaText": {
                        "title": "Call-to-Action Text",
                        "type": "string",
                        "description": "Custom CTA text (optional)"
                    },
                    "industryContext": {
                        "title": "Industry/Context",
                        "type": "string",
                        "description": "Specific industry or context for the article"
                    },
                    "writingModel": {
                        "title": "AI Writing Model",
                        "enum": [
                            "anthropic/claude-3.5-sonnet",
                            "openai/gpt-4o",
                            "anthropic/claude-3-opus"
                        ],
                        "type": "string",
                        "description": "AI model for article writing",
                        "default": "anthropic/claude-3.5-sonnet"
                    },
                    "imageModel": {
                        "title": "AI Image Model",
                        "enum": [
                            "black-forest-labs/flux-1.1-pro",
                            "openai/dall-e-3",
                            "black-forest-labs/flux-schnell"
                        ],
                        "type": "string",
                        "description": "AI model for image generation",
                        "default": "black-forest-labs/flux-schnell"
                    },
                    "openrouterApiKey": {
                        "title": "OpenRouter API Key",
                        "type": "string",
                        "description": "Your OpenRouter API key from https://openrouter.ai/keys"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
