curl -X POST https://searchcompany-main.up.railway.app/api/cron/create-ai-article \
-H "Content-Type: application/json" \
-d '{"business_id": "nike"}'
{
"status": "success",
"files": [
{"path": "pages/top-10-sneaker-brands-2025.js", "content": "..."}
],
"article_path": "/top-10-sneaker-brands-2025/",
"title": "What are the top 10 sneaker brands in 2025?",
"published_date": "2025-12-24",
"project_name": "ai-nike",
"ai_site_url": "https://nike.searchcompany.dev",
"existing_posts": [
{"title": "What is Nike?", "article_path": "/what-is-nike/"}
],
"faq_category": "business_article"
}
π΅ POST - Create AI Article
Create AI Article
Generate AI article content and files (no deployment)
POST
/
api
/
cron
/
create-ai-article
curl -X POST https://searchcompany-main.up.railway.app/api/cron/create-ai-article \
-H "Content-Type: application/json" \
-d '{"business_id": "nike"}'
{
"status": "success",
"files": [
{"path": "pages/top-10-sneaker-brands-2025.js", "content": "..."}
],
"article_path": "/top-10-sneaker-brands-2025/",
"title": "What are the top 10 sneaker brands in 2025?",
"published_date": "2025-12-24",
"project_name": "ai-nike",
"ai_site_url": "https://nike.searchcompany.dev",
"existing_posts": [
{"title": "What is Nike?", "article_path": "/what-is-nike/"}
],
"faq_category": "business_article"
}
Internal endpoint for the Cron service to generate an AI articleβs content and files.
This endpoint does NOT deploy to Vercel. It generates content and files, saves to the database,
and returns the files. Call
/api/cron/deploy-to-vercel separately to deploy all files at once.AI articles are generated from the AI site content (llms.txt, data.json,
HTML), not the original business website.
Products use the businessβs AI site - Products donβt have their own AI websites.
All AI articles (business and product) are deployed to the same business AI site.
Request Body
string
required
Business identifier (org_slug)
string
Optional product/item ID
string
Optional ISO date string to backdate created_at (e.g. β2025-12-21β)
Response
string
βsuccessβ or βerrorβ
array
Array of files to deploy. Each file has
path and content.string
Path to the AI article (e.g. β/top-10-crm-tools-2025/β)
string
AI article title (always a question for AI search optimization)
string
Publication date (ISO format)
string
Vercel project name for deployment
string
AI site URL (e.g. βhttps://nike.searchcompany.devβ)
array
List of existing AI articles (for index generation and deduplication)
string
FAQ category for homepage integration:
"business_article" or "product_article"curl -X POST https://searchcompany-main.up.railway.app/api/cron/create-ai-article \
-H "Content-Type: application/json" \
-d '{"business_id": "nike"}'
{
"status": "success",
"files": [
{"path": "pages/top-10-sneaker-brands-2025.js", "content": "..."}
],
"article_path": "/top-10-sneaker-brands-2025/",
"title": "What are the top 10 sneaker brands in 2025?",
"published_date": "2025-12-24",
"project_name": "ai-nike",
"ai_site_url": "https://nike.searchcompany.dev",
"existing_posts": [
{"title": "What is Nike?", "article_path": "/what-is-nike/"}
],
"faq_category": "business_article"
}
Topic Generation
AI articles use a sophisticated topic generation system designed to stay fresh even at 1000+ posts:Template System
49 SEO-optimized question templates with variable placeholders:{industry}- Inferred by Gemini from business content{problem}- Main problem the business solves{city}- 38 major cities worldwide{audience}- 17 target audiences (startups, enterprises, etc.){year}- Current or next year{list_size}- 3, 5, 7, 10, 15, or 20
Deduplication
The system:- Receives existing AI article titles from the database
- Generates all possible template variations
- Filters out any that match existing titles
- Picks a random unused combination
Example Titles
- βWhat are the top 10 CRM software solutions in 2025?β
- βWhat is the best project management platform in Singapore in 2025?β
- βHow do startups solve team collaboration challenges?β
- βWhat do experts recommend for sales pipeline management in 2025?β
Workflow
1. create-ai-article (ΓN) β Returns files + metadata (parallel, fast)
βββ Each returns: {files, title, article_path, published_date, existing_posts}
2. deploy-to-vercel β Deploys all files at once (single deployment)
βββ Receives all files + metadata, generates index/sitemap
3. submit-indexnow β Notifies search engines of new URLs