AI Article Rewriter & WordPress Publisher
Pricing
from $100.00 / 1,000 perposts
AI Article Rewriter & WordPress Publisher
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
Actor stats
0
Bookmarked
1
Total users
1
Monthly active users
41 minutes ago
Last modified
Categories
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
| Parameter | Type | Required | Description |
|---|---|---|---|
articleUrls | array | Yes | List of article URLs to process (1-50 URLs) |
openaiApiKey | string | No* | Your OpenAI API key. *Required unless set as OPENAI_API_KEY environment variable |
model | string | No | OpenAI model (default: gpt-4o-mini, or set via OPENAI_MODEL env var) |
wordpressUrl | string | No* | Your WordPress site URL (e.g., https://yoursite.com). *Required unless in test mode |
wordpressUsername | string | No* | WordPress username. *Required unless in test mode |
wordpressAppPassword | string | No* | WordPress application password. *Required unless in test mode |
categoryName | string | No* | Category for published posts. *Required unless in test mode |
postStructure | string | No | Custom structure format for articles |
generateImage | boolean | No | Generate featured image (default: true) |
postStatus | string | No | Post status: publish (default) or draft |
testMode | boolean | No | Run 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:
- Log in to your WordPress admin panel
- Go to Users → Profile (or Users → Your Profile)
- Scroll to Application Passwords section
- Enter a name (e.g., "Apify Actor")
- Click Add New Application Password
- Copy the generated password (you won't see it again!)
2. OpenAI API Key
- Go to OpenAI Platform
- Create an account or log in
- Go to API Keys section
- Create a new secret key
- 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:
| Variable | Description |
|---|---|
OPENAI_API_KEY | Your OpenAI API key |
OPENAI_MODEL | Default 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
| URLs | Successful | Failed | Cost |
|---|---|---|---|
| 5 | 5 | 0 | $0.50 |
| 10 | 8 | 2 | $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