BabyLoveGrowth API
Use the BabyLoveGrowth API and fetch generated articles programmatically.
The BabyLoveGrowth API allows you to programmatically fetch your articles and integrate them into your own workflows and custom CMS platforms. Use an API key to authenticate and access your content via REST endpoints.
How to Use the API
Access your articles programmatically with a secure API key. Follow the steps below to get started.
Get Your API Keyv
In BabyLoveGrowth, navigate to Settings → Integrations → API
Click Generate API key
- Copy the key and store it securely
Authenticationv
All API requests use API Key authentication:
Include
X-API-Key: <your-api-key>headerInclude
Content-Type: application/jsonheader
Base URL:
List Recent Articlesv
Fetch a list of your recent articles with a GET request:
curl -X GET "https://api.babylovegrowth.ai/api/integrations/v1/articles" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json"Example Response:
[
{
"id": 10,
"title": "Test Article for Webhook Integration",
"metaDescription": "Test article to verify webhook integration is working correctly",
"content_html": "<h1>Test Article for Webhook Integration</h1>",
"content_markdown": "# Test Article for Webhook Integration",
"languageCode": "en",
"publicUrl": "https://example.com/test-article-webhook",
"createdAt": "2025-03-20T03:41:18.570Z"
}
]Fetch One Articlev
Retrieve a specific article by ID:
curl -X GET "https://api.babylovegrowth.ai/api/integrations/v1/articles/12345" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json"Example Response:
{
"id": 12345,
"title": "Sample Article Title",
"slug": "sample-article-title",
"content_markdown": "# Sample...",
"content_html": "<h1>Sample...</h1>",
"meta_description": "Example meta description",
"hero_image_url": "https://path-to-image.jpg",
"orgWebsite": "https://your-website.com",
"created_at": "2025-01-15T10:30:00.000Z",
"seedKeyword": "example",
"keywords": ["keyword1", "keyword2"]
}Replace 12345 with your article ID.
Pagination & Filteringv
Control how many articles you fetch and navigate through large result sets using query parameters:
Query Parameters:
limit- Number of articles to return (default: 10)page- Page number to retrieve (default: 1)
Example: Get first 5 articles
curl -X GET "https://api.babylovegrowth.ai/api/integrations/v1/articles?limit=5&page=1" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json"Example: Get next 20 articles (page 2)
curl -X GET "https://api.babylovegrowth.ai/api/integrations/v1/articles?limit=20&page=2" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json"Response Structure:
The API returns an array of article objects:
[
{
"id": 151241,
"title": "Article Title",
"slug": "article-slug",
"hero_image_url": "https://...",
"languageCode": "en",
"meta_description": "Description...",
"excerpt": "Article excerpt...",
"content_html": "<h1>Content...</h1>",
"content_markdown": "# Content...",
"orgWebsite": "https://your-site.com",
"created_at": "2026-01-20T09:59:49.132Z",
"seedKeyword": "main keyword",
"keywords": ["keyword1", "keyword2"]
}
// ... more articles
]Node.js Pagination Example:
async function fetchAllArticles() {
const allArticles = [];
let page = 1;
let limit = 50;
while (true) {
const res = await fetch(
`https://api.babylovegrowth.ai/api/integrations/v1/articles?page=${page}&limit=${limit}`,
{ headers: { 'X-API-Key': process.env.BABYLOVE_API_KEY } }
);
if (!res.ok) {
throw new Error(`API error: ${res.status}`);
}
const articles = await res.json();
if (articles.length === 0) break;
allArticles.push(...articles);
// If we got fewer articles than the limit, we've reached the end
if (articles.length < limit) break;
page++;
}
return allArticles;
}Tips:
- Articles are sorted by creation date (newest first)
- If the response contains fewer articles than your
limit, you've reached the last page - Use reasonable page sizes (50-100) to minimize API calls
Send to Your CMS (Example)v
Pseudo-flow:
- Fetch an article from the BabyLoveGrowth API
- Map fields to your CMS (title, content_html, metaDescription, slug, languageCode)
- Create or upsert the post via your CMS API
Node.js Example:
import fetch from 'node-fetch';
async function syncArticle(id) {
const res = await fetch(`https://api.babylovegrowth.ai/api/integrations/v1/articles/${id}`, {
headers: { 'X-API-Key': process.env.BABYLOVE_API_KEY }
});
const article = await res.json();
// Upsert into your CMS
await fetch('https://your-cms.example.com/posts', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
slug: article.slug || article.id,
title: article.title,
html: article.content_html,
description: article.metaDescription,
language: article.languageCode
})
});
}Best Practices & Tipsv
- Keep your API key secret; rotate it immediately if exposed
Use
content_markdownif your CMS prefers Markdown formatUse
content_htmlfor HTML-based CMS platformsFor real-time pushes instead of polling, consider the Webhooks integration
Troubleshooting & FAQv
Getting 401 Unauthorized?
Check your API key and header spelling. Ensure you're using
X-API-Key: <key> format.
Getting 404 errors?
The article ID may not exist in your account. Verify the ID by listing all articles first.
Hitting rate limits?
Add exponential backoff and cache responses where possible. Avoid polling too frequently.
What format should I use - HTML or Markdown?
Use content_html for most modern CMS platforms. Use
content_markdown if your CMS prefers Markdown.
Can I use this with any CMS?
Yes. The API returns standard JSON. You can integrate with any platform that accepts programmatic content creation.
How do I get notified when new articles are published?
Use the Webhooks integration for real-time push notifications instead of polling the API.
Need more help?
Contact support via the bottom-right chat icon.