14 articles
4,577 Minds Enriched
Boost Your Knowledge

Blog API Documentation

Darren Wilden
Effortless access to content
Documentation

Welcome to the DW Innovation Blog API documentation. This API provides programmatic access to the blog content, allowing developers to integrate the articles into their applications.

Base URL

All API requests should be made to the following base URL:

https://dwinnovation.dk/blog/v1

Note: All API requests must be made over HTTPS. Requests over HTTP will be rejected.

Authentication

No authentication is required to access the API. However, there is rate limiting to ensure fair usage:

  • 60 requests per minute per IP address
  • 1000 requests per day per IP address

If you exceed these limits, you'll receive a 429 Too Many Requests response.

API Endpoints

GET /api/v1/info

Returns basic information about the website and blog, including the total number of available articles.

Response

{
  "website": "https://dwinnovation.dk",
  "description": "Innovation and technology insights focused on AI, business workflows, and digital transformation.",
  "total_articles": 13
}

Response Fields

website string
The full URL of the website
description string
A short description of the website (limited to 160 characters)
total_articles integer
The total number of published articles available through the API
GET /api/v1/posts

Returns a list of published blog posts, sorted by publication date in descending order (newest first).

Query Parameters

limit integer
Optional. Limits the number of returned posts. Default is all posts.
category string
Optional. Filter posts by category.

Response

{
  "count": 3,
  "posts": [
    {
      "title": "Nari Dia is an AI conversation generator",
      "date": "2025-04-30",
      "description": "Nari released an AI conversation generator that's not only impressive but pushes the boundaries of what's possible with open-source audio AI. Despite being in w",
      "image": "https://dwinnovation.dk/blog/images/nari_dia_tts.jpg",
      "url": "https://dwinnovation.dk/blog/nari-dia-is-an-ai-conversation-generator"
    },
    {
      "title": "Supercharge Your Workflow",
      "date": "2025-04-29",
      "description": "In today's fast-paced business landscape, staying competitive isn't just about working harder, it's about working smarter. This interactive toolkit brings toget",
      "image": "https://dwinnovation.dk/blog/images/supercharge_your_workflow.jpg",
      "url": "https://dwinnovation.dk/blog/supercharge-your-workflow"
    },
    {
      "title": "Google is Leveling Up With AI Videos",
      "date": "2025-04-28",
      "description": "Google Gemini Veo 2 is simply amazing, even though it's \"only\" a Text-to-Video generator... for now! However, there is still room for improvement. Google has tr",
      "image": "https://dwinnovation.dk/blog/images/google_gemini_veo2.jpg",
      "url": "https://dwinnovation.dk/blog/google-is-leveling-up-with-ai-videos"
    }
  ]
}

Response Fields

count integer
The number of posts returned in this response
posts array
An array of post objects
posts[].title string
The title of the post
posts[].date string
The publication date in YYYY-MM-DD format
posts[].description string
A short description of the post (limited to 160 characters)
posts[].image string | null
The URL to the post's header image, or null if no image is available
posts[].url string
The full URL to the post on the website
GET /api/v1/posts/{slug}

Returns detailed information about a specific post, identified by its URL slug.

Path Parameters

slug string required
The URL slug of the post to retrieve (e.g., "the-art-of-prompt-engineering")

Response

{
  "title": "The Art of Prompt Engineering",
  "date": "2025-02-15",
  "description": "In the evolving landscape of artificial intelligence, the ability to effectively communicate with AI isn't just a skill—it's an art form.",
  "image": "https://dwinnovation.dk/blog/images/prompt_engineering.jpg",
  "url": "https://dwinnovation.dk/blog/the-art-of-prompt-engineering"
}

Response Fields

title string
The title of the post
date string
The publication date in YYYY-MM-DD format
description string
A short description of the post (limited to 160 characters)
image string | null
The URL to the post's header image, or null if no image is available
url string
The full URL to the post on the website

Error Responses

{
  "error": "Post not found"
}

HTTP Status Code: 404 Not Found

Code Examples

Here are examples of how to use the DW Innovation Blog API in various programming languages.

JavaScript Example

// Fetch the latest blog posts
async function getLatestPosts(limit = 5) {
  try {
    const response = await fetch(`https://dwinnovation.dk/blog/v1/api/v1/posts?limit=${limit}`);
    
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    
    const data = await response.json();
    
    // Display the posts
    console.log(`Found ${data.count} posts`);
    
    data.posts.forEach(post => {
      console.log(`Title: ${post.title}`);
      console.log(`Date: ${post.date}`);
      console.log(`Description: ${post.description}`);
      console.log(`Read more: ${post.url}`);
      console.log('---');
    });
    
    return data;
  } catch (error) {
    console.error('Error fetching posts:', error);
  }
}

// Get website information
async function getWebsiteInfo() {
  try {
    const response = await fetch('https://dwinnovation.dk/blog/v1/api/v1/info');
    
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    
    const data = await response.json();
    console.log(`Website: ${data.website}`);
    console.log(`Description: ${data.description}`);
    console.log(`Total articles: ${data.total_articles}`);
    
    return data;
  } catch (error) {
    console.error('Error fetching website info:', error);
  }
}

// Call the functions
getWebsiteInfo();
getLatestPosts(3);

PHP Example

<?php
// Function to fetch website information
function getWebsiteInfo() {
    $apiUrl = 'https://dwinnovation.dk/blog/v1/api/v1/info';
    
    $response = @file_get_contents($apiUrl);
    
    if ($response === false) {
        return [
            'error' => 'Failed to connect to API',
            'success' => false
        ];
    }
    
    return [
        'data' => json_decode($response, true),
        'success' => true
    ];
}

// Function to fetch posts with optional parameters
function getPosts($limit = null, $category = null) {
    $apiUrl = 'https://dwinnovation.dk/blog/v1/api/v1/posts';
    
    // Add query parameters if provided
    $params = [];
    if ($limit !== null) {
        $params['limit'] = $limit;
    }
    if ($category !== null) {
        $params['category'] = $category;
    }
    
    if (!empty($params)) {
        $apiUrl .= '?' . http_build_query($params);
    }
    
    $response = @file_get_contents($apiUrl);
    
    if ($response === false) {
        return [
            'error' => 'Failed to connect to API',
            'success' => false
        ];
    }
    
    return [
        'data' => json_decode($response, true),
        'success' => true
    ];
}

// Function to fetch a specific post by slug
function getPostBySlug($slug) {
    $apiUrl = "https://dwinnovation.dk/blog/v1/api/v1/posts/{$slug}";
    
    $response = @file_get_contents($apiUrl);
    
    if ($response === false) {
        // Check if it's a 404 error
        $headers = @get_headers($apiUrl);
        if ($headers && strpos($headers[0], '404') !== false) {
            return [
                'error' => 'Post not found',
                'success' => false
            ];
        }
        
        return [
            'error' => 'Failed to connect to API',
            'success' => false
        ];
    }
    
    return [
        'data' => json_decode($response, true),
        'success' => true
    ];
}

// Usage examples
// Get website information
$siteInfo = getWebsiteInfo();
if ($siteInfo['success']) {
    $info = $siteInfo['data'];
    echo "Website: {$info['website']}
"; echo "Total articles: {$info['total_articles']}
"; } else { echo "Error: {$siteInfo['error']}
"; } // Get the latest 3 posts $latestPosts = getPosts(3); if ($latestPosts['success']) { $posts = $latestPosts['data']['posts']; echo "Latest Posts"; foreach ($posts as $post) { echo "Title: {$post['title']}"; echo "Published on: {$post['date']}"; echo "Description: {$post['description']}

"; echo "URL: {$post['url']}"; } }

Python Example

import requests

def get_website_info():
    """Fetch basic information about the website and blog."""
    try:
        response = requests.get('https://dwinnovation.dk/blog/v1/api/v1/info')
        response.raise_for_status()  # Raise exception for 4XX/5XX responses
        
        data = response.json()
        print(f"Website: {data['website']}")
        print(f"Description: {data['description']}")
        print(f"Total articles: {data['total_articles']}")
        
        return data
    except requests.exceptions.RequestException as e:
        print(f"Error fetching website info: {e}")
        return None

def get_posts(limit=None, category=None):
    """Fetch blog posts with optional filtering."""
    params = {}
    if limit:
        params['limit'] = limit
    if category:
        params['category'] = category
        
    try:
        response = requests.get(
            'https://dwinnovation.dk/blog/v1/api/v1/posts',
            params=params
        )
        response.raise_for_status()
        
        data = response.json()
        print(f"Found {data['count']} posts")
        
        for post in data['posts']:
            print(f"Title: {post['title']}")
            print(f"Date: {post['date']}")
            print(f"URL: {post['url']}")
            print("---")
            
        return data
    except requests.exceptions.RequestException as e:
        print(f"Error fetching posts: {e}")
        return None

def get_post_by_slug(slug):
    """Fetch a specific post by its URL slug."""
    try:
        response = requests.get(f'https://dwinnovation.dk/blog/v1/api/v1/posts/{slug}')
        
        if response.status_code == 404:
            print(f"Post with slug '{slug}' not found")
            return None
            
        response.raise_for_status()
        post = response.json()
        
        print(f"Title: {post['title']}")
        print(f"Date: {post['date']}")
        print(f"Description: {post['description']}")
        
        return post
    except requests.exceptions.RequestException as e:
        print(f"Error fetching post: {e}")
        return None

# Usage examples
if __name__ == "__main__":
    # Get website information
    site_info = get_website_info()
    
    # Get the 3 most recent posts
    recent_posts = get_posts(limit=3)
    
    # Get a specific post by slug
    post = get_post_by_slug('the-art-of-prompt-engineering')

Best Practices

  • Cache API responses when possible to reduce unnecessary requests
  • Implement proper error handling in your application
  • Respect the API rate limits to ensure fair usage for all users
  • When linking to articles, always use the provided URL to ensure proper attribution
  • Consider implementing pagination in your application when displaying large numbers of posts

Need help? If you encounter any issues or have questions about the API, please use the contact page.

Share this page

Code copied to clipboard!

Share this page