Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

API

FeedPal provides a REST API to retrieve your articles programmatically. This API allows you to integrate your FeedPal content into your applications, websites, or other services.

To use the API, you need to have an API key. You can get your API key by going to the FeedPal dashboard and clicking on “Developer settings”.

Represents a single article in your feed.

interface Article {
previewImageUrl?: string; // Optional preview image URL
publicationDate: string; // ISO date string (depends on your settings)
locale: string; // Language/locale code (e.g., 'en', 'es')
title: string; // Article title
slug: string; // URL-friendly identifier
contentPreview: string; // Short preview of the content
content?: string; // Full article content (only when request one article)
}

Used for endpoints that return paginated results.

interface PaginatedResponse<T> {
content: T[]; // Array of items
totalElements: number; // Total number of items
page: number; // Current page number
totalPages: number; // Total number of pages
}

Options for listing articles.

interface ListOptions {
locale?: string; // Filter by language/locale
page: number; // Page number (1-based)
itemsPerPage?: number; // Items per page (default: 20)
}

The base URL is https://back.thefeedpal.app

All API requests require authentication using your API key. You need to add the API key to the Authorization header of all requests.

Example:

const response = await fetch('https://back.thefeedpal.app/api/articles', {
headers: {
'Authorization': `Bearer ${apiKey}`
}
});

Endpoint: GET /api/status

Check if the API is running and accessible.

const status = await feedApiClient.status();
console.log(status); // "OK" or error message

Endpoint: GET /api/articles

Retrieve a paginated list of articles.

Query Parameters:

  • page (required): Page number (1-based)
  • language (optional): Filter by locale (default: ‘en’)
  • pageSize (optional): Number of items per page (default: 20)

Response:

{
"content": [
{
"uid": "article-123",
"title": "Getting Started with FeedPal",
"slug": "getting-started",
"contentPreview": "Learn how to set up your first feed...",
"publicationDate": "2024-01-15T10:30:00Z",
"locale": "en",
"previewImageUrl": "https://example.com/image.jpg"
}
],
"totalElements": 50,
"page": 1,
"totalPages": 3
}

Endpoint: GET /api/articles/:slug

Retrieve a specific article by its slug.

Path Parameters:

  • slug (required): The article’s slug

Query Parameters:

  • language (optional): Filter by locale

Example:

// Get article by slug
const article = await feedApiClient.getArticle({
slug: 'getting-started',
locale: 'en'
});
if (article) {
console.log(article.title);
console.log(article.content);
}

Response:

{
"uid": "article-123",
"title": "Getting Started with FeedPal",
"slug": "getting-started",
"contentPreview": "Learn how to set up your first feed...",
"content": "<p>Full article content in HTML format...</p>",
"publicationDate": "2024-01-15T10:30:00Z",
"locale": "en",
"previewImageUrl": "https://example.com/image.jpg"
}
// Get articles in different languages
const englishArticles = await feedApiClient.listArticles({
page: 1,
locale: 'en'
});
const spanishArticles = await feedApiClient.listArticles({
page: 1,
locale: 'es'
});
// Get full article content
const article = await feedApiClient.getArticle({
slug: 'my-article-slug',
locale: 'en'
});
if (article) {
// Render full article
document.title = article.title;
document.getElementById('content').innerHTML = article.content;
} else {
// Handle article not found
document.getElementById('content').innerHTML = '<h1>Article not found</h1>';
}