Article API
Access our complete article database programmatically. Free, fast, and easy to integrate.
API Base URL
https://stuccimarketing.com/apiPublic Access
No authentication required for reading articles
Fast & Reliable
Optimized queries with caching for instant responses
Rate Limited
Fair usage policy with 1000 requests/hour
Rich Filtering
Filter by category, date, sort, and paginate results
// Using Fetch API
const apiUrl = 'https://stuccimarketing.com/api/articlesAPI';
async function getArticles() {
try {
const response = await fetch(apiUrl + '?limit=10&sort=-published_date');
const data = await response.json();
console.log(data.articles);
return data;
} catch (error) {
console.error('Error:', error);
}
}
// Using Axios
import axios from 'axios';
const articles = await axios.get(apiUrl, {
params: {
category: 'web_development',
limit: 10,
sort: '-published_date'
}
});
console.log(articles.data);API Endpoints
/articlesAPIList Articles
Get a paginated list of published articles with filtering and sorting
Parameters:
categorystringFilter by category (e.g., 'web_development')limitnumberNumber of results (default: 10, max: 50)offsetnumberPagination offset (default: 0)sortstringSort field (e.g., '-published_date', 'title')from_datestringFilter articles from date (YYYY-MM-DD)to_datestringFilter articles to date (YYYY-MM-DD)https://stuccimarketing.com/api/articlesAPI?category=web_development&limit=10&sort=-published_date/articleByIdAPIGet Article by ID
Retrieve a specific article using its unique ID
Parameters:
idstringhttps://stuccimarketing.com/api/articleByIdAPI?id=abc123def456/articlesBySlugAPIGet Article by Slug
Retrieve a specific article using its URL slug
Parameters:
slugstringhttps://stuccimarketing.com/api/articlesBySlugAPI?slug=mastering-react-hooks/categoriesAPIList Categories
Get all available article categories with article counts
https://stuccimarketing.com/api/categoriesAPIFilter articles by these category values:
Common Use Cases
Load articles in batches
// Paginate through articles
async function getAllArticles() {
const allArticles = [];
let offset = 0;
const limit = 20;
while (true) {
const response = await fetch(
`https://stuccimarketing.com/api/articlesAPI?limit=${limit}&offset=${offset}`
);
const data = await response.json();
allArticles.push(...data.articles);
if (data.articles.length < limit) break;
offset += limit;
}
return allArticles;
}Successful API responses follow this JSON structure:
{
"articles": [
{
"id": "abc123",
"title": "Mastering React Hooks",
"subtitle": "A comprehensive guide...",
"content": "<p>Article content...</p>",
"category": "web_development",
"categories": ["web_development", "tutorials"],
"tags": ["react", "javascript", "hooks"],
"author": "John Doe",
"published_date": "2024-01-15",
"read_time": 10,
"views": 1250,
"slug": "mastering-react-hooks",
"featured_image": "https://...",
"meta_title": "Mastering React Hooks | Tutorial",
"meta_description": "Learn React Hooks...",
"created_date": "2024-01-15T10:00:00Z"
}
],
"total": 45,
"limit": 10,
"offset": 0
}Error Handling
Returned when you exceed 1000 requests per hour
{
"error": "Rate limit exceeded",
"details": "You have exceeded the maximum of 1000 requests per hour",
"retry_after": 3600
}How to handle:
- Check the
retry_afterfield (seconds) - Implement exponential backoff in your retry logic
- Consider caching responses to reduce API calls
- Use the
Retry-AfterHTTP header
Returned when request parameters are invalid
{
"error": "Invalid parameter",
"details": "limit must be between 1 and 50",
"parameter": "limit",
"value": "100"
}Common validation errors:
limit: Must be 1-50offset: Must be non-negativecategory: Must be valid category namefrom_date/to_date: Must be YYYY-MM-DD format
Returned when requested article doesn't exist
{
"error": "Article not found",
"details": "No article exists with the given ID or slug",
"id": "nonexistent-id"
}When this happens:
- The article ID or slug doesn't exist
- The article was deleted or unpublished
- There's a typo in the ID/slug parameter
Returned when there's an unexpected server error
{
"error": "Internal server error",
"details": "An unexpected error occurred",
"request_id": "req_abc123xyz"
}What to do:
- Retry the request after a short delay
- Check your request parameters are correctly formatted
- Contact support if the issue persists
- Include the
request_idwhen reporting
✅ Do:
- • Check HTTP status codes
- • Parse error response JSON
- • Implement retry logic with backoff
- • Cache successful responses
- • Log errors with request_id
- • Handle rate limits gracefully
❌ Don't:
- • Ignore error responses
- • Retry immediately without backoff
- • Make excessive parallel requests
- • Hardcode API responses in your app
- • Expose API errors to end users
- • Retry indefinitely