AI Article Rewriter & WordPress Publisher avatar

AI Article Rewriter & WordPress Publisher

Under maintenance

Pricing

from $100.00 / 1,000 perposts

Go to Apify Store
AI Article Rewriter & WordPress Publisher

AI Article Rewriter & WordPress Publisher

Under maintenance

Fetch articles from multiple URLs, rewrite them using AI, generate featured images, and publish directly to WordPress.

Pricing

from $100.00 / 1,000 perposts

Rating

0.0

(0)

Developer

Aadhithya

Aadhithya

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

41 minutes ago

Last modified

Share

An Apify Actor that fetches articles from multiple URLs, rewrites them using AI (OpenAI GPT), generates featured images, and publishes directly to WordPress.

Features

  • Article Scraping: Extracts content from any public article URL using Cheerio and Playwright
  • AI Rewriting: Rewrites articles using OpenAI GPT models for unique, engaging content
  • Image Generation: Creates featured images using DALL-E 3 based on article topics
  • WordPress Publishing: Automatically publishes posts via WordPress REST API
  • Custom Structure: Supports custom post structures (e.g., "Introduction → Key Points → Conclusion")
  • Post Status: Choose to publish immediately or save as draft
  • Test Mode: Run in test mode without API keys to verify setup
  • Monetization: Pay-per-post pricing ($0.10 per successful post)
  • Error Handling: Graceful error handling - continues processing even if individual articles fail

Input Parameters

ParameterTypeRequiredDescription
articleUrlsarrayYesList of article URLs to process (1-50 URLs)
openaiApiKeystringNo*Your OpenAI API key. *Required unless set as OPENAI_API_KEY environment variable
modelstringNoOpenAI model (default: gpt-4o-mini, or set via OPENAI_MODEL env var)
wordpressUrlstringNo*Your WordPress site URL (e.g., https://yoursite.com). *Required unless in test mode
wordpressUsernamestringNo*WordPress username. *Required unless in test mode
wordpressAppPasswordstringNo*WordPress application password. *Required unless in test mode
categoryNamestringNo*Category for published posts. *Required unless in test mode
postStructurestringNoCustom structure format for articles
generateImagebooleanNoGenerate featured image (default: true)
postStatusstringNoPost status: publish (default) or draft
testModebooleanNoRun in test mode without API keys (default: false)

Setup

1. WordPress Application Password

To use this Actor, you need to create an Application Password in WordPress:

  1. Log in to your WordPress admin panel
  2. Go to Users → Profile (or Users → Your Profile)
  3. Scroll to Application Passwords section
  4. Enter a name (e.g., "Apify Actor")
  5. Click Add New Application Password
  6. Copy the generated password (you won't see it again!)

2. OpenAI API Key

  1. Go to OpenAI Platform
  2. Create an account or log in
  3. Go to API Keys section
  4. Create a new secret key
  5. Copy the key for use in the Actor

Usage

Basic Example

{
"articleUrls": [
"https://example.com/article-1",
"https://example.com/article-2"
],
"openaiApiKey": "sk-...",
"wordpressUrl": "https://yourwebsite.com",
"wordpressUsername": "admin",
"wordpressAppPassword": "xxxx xxxx xxxx xxxx",
"categoryName": "Blog"
}

With Custom Structure

{
"articleUrls": ["https://example.com/article"],
"openaiApiKey": "sk-...",
"wordpressUrl": "https://yourwebsite.com",
"wordpressUsername": "admin",
"wordpressAppPassword": "xxxx xxxx xxxx xxxx",
"categoryName": "Technology",
"postStructure": "Introduction → Key Points → Practical Examples → Conclusion",
"generateImage": true,
"model": "gpt-4o"
}

Test Mode (No API Keys Required)

Enable test mode to verify the Actor works without consuming API credits or requiring WordPress credentials:

{
"articleUrls": ["https://example.com/article"],
"testMode": true
}

In test mode, the Actor returns mock data and does not make any external API calls.

Draft Mode

Save posts as drafts instead of publishing immediately:

{
"articleUrls": ["https://example.com/article"],
"openaiApiKey": "sk-...",
"wordpressUrl": "https://yourwebsite.com",
"wordpressUsername": "admin",
"wordpressAppPassword": "xxxx xxxx xxxx xxxx",
"categoryName": "Blog",
"postStatus": "draft"
}

Output

The Actor outputs a dataset with the following structure for each processed article:

{
"originalUrl": "https://example.com/original-article",
"title": "Original Article Title",
"rewrittenTitle": "AI Rewritten Title",
"content": "<p>Rewritten HTML content...</p>",
"imageUrl": "https://...generated-image.png",
"wordpressPostUrl": "https://yourwebsite.com/rewritten-title/",
"status": "success"
}

Error Handling

The Actor handles errors gracefully:

  • Scraping fails: Skips the URL and continues with next
  • AI rewriting fails: Returns original content with error status
  • Image generation fails: Continues without featured image
  • WordPress publishing fails: Returns error status with details

Environment Variables

Instead of providing sensitive credentials in the input, you can set them as environment variables:

VariableDescription
OPENAI_API_KEYYour OpenAI API key
OPENAI_MODELDefault OpenAI model (e.g., gpt-4o-mini)

Set these in your Apify Actor's Environment variables tab for better security.

Monetization

This Actor uses pay-per-event pricing:

  • $0.10 USD per post successfully processed and published
  • Event name: Perpost
  • Only successful posts are charged (failures are free)

Example Costs

URLsSuccessfulFailedCost
550$0.50
1082$0.80

Rate Limits & Performance

  • The Actor adds a 2-second delay between processing articles to avoid rate limits
  • Each article typically takes 30-60 seconds to process (depending on AI response time)
  • Image generation adds approximately 10-20 seconds per article
  • Maximum recommended: 50 URLs per run

Requirements

  • WordPress 5.6+ with REST API enabled
  • WordPress Application Passwords feature enabled
  • OpenAI API account with available credits
  • Publicly accessible article URLs

Troubleshooting

"WordPress connection failed"

  • Verify your WordPress URL is correct (including https://)
  • Check that Application Passwords are enabled
  • Ensure the REST API is accessible at /wp-json/wp/v2/

"Empty response from OpenAI"

  • Verify your OpenAI API key is valid
  • Check that you have available API credits
  • Try a different model (gpt-4o-mini is most reliable)

"Failed to extract article content"

  • Some websites block scraping - try different URLs
  • Ensure the URLs are publicly accessible
  • JavaScript-heavy sites may require more processing time

License

Apache-2.0