> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Blog URL to Video

> Convert any blog article or webpage into a video by providing its URL

This guide shows you how to convert blog articles and web pages into engaging videos. Simply provide a URL and the API automatically extracts content, selects visuals, and creates a complete video - perfect for repurposing written content for social media and video platforms.

## What You'll Learn

> [card] URL to Video
>
> Convert blog URLs to video storyboards automatically

> [card] Auto Extraction
>
> Automatic content extraction and processing

> [card] Smart Visuals
>
> AI-selected visuals matched to your content

> [card] Job Monitoring
>
> Track video creation progress in real-time

## Before You Begin

Make sure you have:

* A [Pictory API key](https://app.pictory.ai/api-access)
* Node.js or Python installed on your machine
* A publicly accessible blog article or webpage URL
* Basic understanding of web content structure

```bash npm theme={null}
npm install axios
```

```bash pip theme={null}
pip install requests
```

## How Blog-to-Video Works

When you convert a blog URL to video:

1. **URL Access** - The API accesses your provided URL
2. **Content Extraction** - Text content is scraped from the web page
3. **Content Analysis** - The content is analyzed for key topics and themes
4. **Scene Generation** - Content is intelligently split into logical video scenes
5. **Visual Selection** - Appropriate stock visuals are matched to each scene
6. **Caption Generation** - Subtitles are created from the extracted text
7. **Video Rendering** - The final video is assembled and rendered

> [!NOTE]
>
> The URL must be publicly accessible without requiring login, subscription, or paywall access. The API uses intelligent parsing to extract the main article content while filtering out ads and sidebars.

## Complete Example

```javascript Node.js theme={null}
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY";

// Sample blog URL - replace with your own blog URL
const BLOG_URL = "https://blog.pictory.ai/10-best-text-to-video-ai-tools/";

async function createBlogUrlToVideo() {
  try {
    console.log("Creating video from blog URL...");

    const response = await axios.post(
      `${API_BASE_URL}/v2/video/storyboard/render`,
      {
        videoName: "blog_url_to_video",
        scenes: [
          {
            blogUrl: BLOG_URL,             // Blog article URL
            createSceneOnNewLine: true,    // Create new scene on each new line
            createSceneOnEndOfSentence: true, // Create new scene at end of sentences
          }
        ],
      },
      {
        headers: {
          "Content-Type": "application/json",
          Authorization: API_KEY,
        },
      }
    );

    const jobId = response.data.data.jobId;
    console.log("✓ Video creation started!");
    console.log("Job ID:", jobId);

    // Monitor progress
    console.log("\nMonitoring video creation...");
    let jobCompleted = false;
    let jobResult = null;

    while (!jobCompleted) {
      const statusResponse = await axios.get(
        `${API_BASE_URL}/v1/jobs/${jobId}`,
        {
          headers: { Authorization: API_KEY },
        }
      );

      const status = statusResponse.data.data.status;
      console.log("Status:", status);

      if (status === "completed") {
        jobCompleted = true;
        jobResult = statusResponse.data;
        console.log("\n✓ Video from blog URL is ready!");
        console.log("Video URL:", jobResult.data.videoURL);
      } else if (status === "failed") {
        throw new Error("Video creation failed: " + JSON.stringify(statusResponse.data));
      }

      await new Promise(resolve => setTimeout(resolve, 5000));
    }

    return jobResult;
  } catch (error) {
    console.error("Error:", error.response?.data || error.message);
    throw error;
  }
}

createBlogUrlToVideo();
```

```python Python theme={null}
import requests
import time
import json

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'

# Sample blog URL - replace with your own blog URL
BLOG_URL = "https://blog.pictory.ai/10-best-text-to-video-ai-tools/"

def create_blog_url_to_video():
    try:
        print("Creating video from blog URL...")

        response = requests.post(
            f'{API_BASE_URL}/v2/video/storyboard/render',
            json={
                'videoName': 'blog_url_to_video',
                'scenes': [
                    {
                        'blogUrl': BLOG_URL,       # Blog article URL
                        'createSceneOnNewLine': True,    # Create new scene on each new line
                        'createSceneOnEndOfSentence': True  # Create new scene at end of sentences
                    }
                ]
            },
            headers={
                'Content-Type': 'application/json',
                'Authorization': API_KEY
            }
        )
        response.raise_for_status()

        job_id = response.json()['data']['jobId']
        print("✓ Video creation started!")
        print(f"Job ID: {job_id}")

        # Monitor progress
        print("\nMonitoring video creation...")
        job_completed = False
        job_result = None

        while not job_completed:
            status_response = requests.get(
                f'{API_BASE_URL}/v1/jobs/{job_id}',
                headers={'Authorization': API_KEY}
            )
            status_response.raise_for_status()

            status = status_response.json()['data']['status']
            print(f"Status: {status}")

            if status == 'completed':
                job_completed = True
                job_result = status_response.json()
                print("\n✓ Video from blog URL is ready!")
                print(f"Video URL: {job_result['data']['videoURL']}")
            elif status == 'failed':
                raise Exception(f"Video creation failed: {status_response.json()}")

            time.sleep(5)

        return job_result

    except requests.exceptions.RequestException as error:
        print(f"Error: {error}")
        if hasattr(error, 'response') and error.response is not None:
            print(f"Response: {error.response.text}")
        raise

if __name__ == '__main__':
    create_blog_url_to_video()
```

## Understanding the Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `videoName` | string | Yes | A descriptive name for your video project |
| `scenes` | array | Yes | Array of scene objects |
| `scenes[].blogUrl` | string | Yes | The URL of the blog article or webpage to convert |
| `scenes[].createSceneOnNewLine` | boolean | No | Create a new scene on each new line in the content (default: false) |
| `scenes[].createSceneOnEndOfSentence` | boolean | No | Create a new scene at the end of each sentence (default: false) |

## Supported Content Types

The API can extract and convert content from:

| Content Type | Examples | Processing Notes |
| - | - | - |
| Blog Posts | Personal blogs, company blogs, Medium articles | Best results with 300-2000 word articles |
| News Articles | Online news sites, magazine articles | Main content extracted, ads filtered out |
| WordPress Sites | WordPress-powered blogs and sites | Clean extraction from WordPress structure |
| Content Platforms | Medium, Substack, LinkedIn articles | Platform-specific parsing for best results |
| Static Web Pages | HTML pages, landing pages | Works with well-structured HTML content |

> [!WARNING]
>
> **Access Requirements:** The URL must be publicly accessible without login, subscription, or paywall. Password-protected, members-only, or paywalled content cannot be extracted.

## Common Use Cases

### Content Marketing and Social Media

```javascript theme={null}
{
  videoName: "latest_blog_post_social",
  scenes: [
    {
      blogUrl: "https://yourblog.com/latest-marketing-tips",
      createSceneOnNewLine: true,
      createSceneOnEndOfSentence: true
    }
  ]
}
```

**Result:** Blog content repurposed as video for social media sharing.

### News and Updates

```javascript theme={null}
{
  videoName: "company_news_announcement",
  scenes: [
    {
      blogUrl: "https://company.com/news/quarterly-update",
      createSceneOnNewLine: true,
      createSceneOnEndOfSentence: true
    }
  ]
}
```

**Result:** News article transformed into shareable video format.

### Educational Content

```javascript theme={null}
{
  videoName: "tutorial_how_to_guide",
  scenes: [
    {
      blogUrl: "https://knowledge-base.com/how-to-use-feature",
      createSceneOnNewLine: true,
      createSceneOnEndOfSentence: true
    }
  ]
}
```

**Result:** Tutorial article converted to video for better engagement.

### Product Announcements

```javascript theme={null}
{
  videoName: "new_product_launch",
  scenes: [
    {
      blogUrl: "https://blog.company.com/introducing-new-product",
      createSceneOnNewLine: true,
      createSceneOnEndOfSentence: true
    }
  ]
}
```

**Result:** Product announcement blog as promotional video.

## Best Practices

> [accordion] Choose Well-Structured Articles
>
> Select articles that convert well to video:
>
> * **Clear Structure**: Articles with headings and paragraphs work best
> * **Appropriate Length**: 300-2000 words is ideal for video conversion
> * **Rich Content**: Articles with descriptive text help AI select better visuals
> * **Topic Focus**: Focused articles on specific topics convert better than general overviews
> * **Visual Language**: Descriptive, visual language helps the AI match relevant stock footage

> [accordion] Verify URL Accessibility
>
> Ensure your URL will work:
>
> * **Public Access**: URL must be accessible without login (test in incognito browser)
> * **No Paywalls**: Content behind paywalls cannot be extracted
> * **Clean URLs**: Use the article URL, not shortened or tracking URLs
> * **Direct Link**: Link directly to the article, not category or archive pages
> * **Active Page**: Ensure the page hasn't been deleted or moved

> [accordion] Optimize Article Content
>
> Prepare your articles for best conversion:
>
> * **Descriptive Text**: Use visual, descriptive language in your writing
> * **Logical Sections**: Break content into clear sections with headings
> * **Concise Paragraphs**: Shorter paragraphs (3-5 sentences) work better
> * **Key Points**: Highlight main ideas that translate well to visual scenes
> * **Active Voice**: Use active voice for more engaging narration

> [accordion] Plan for Video Length
>
> Consider appropriate video duration:
>
> * **Short Articles (300-500 words)**: 1-2 minute videos
> * **Medium Articles (500-1000 words)**: 2-4 minute videos
> * **Long Articles (1000-2000 words)**: 4-6 minute videos
> * **Very Long Articles (2000+ words)**: May be automatically summarized
> * **Social Media**: Consider extracting key sections for shorter clips

> [accordion] Test Different Content Types
>
> Experiment to find what works best:
>
> * **Start Simple**: Begin with shorter, well-structured articles
> * **Compare Platforms**: Different blogging platforms may yield different results
> * **Review Output**: Check generated videos to refine your content strategy
> * **Iterate**: Use insights from generated videos to improve future articles
> * **Document Success**: Note which article types and structures work best

## Troubleshooting

> [accordion] Error: Unable to extract content from URL
>
> **Problem:** The API cannot access or parse content from the URL.
>
> **Solution:**
>
> * Verify the URL is publicly accessible (test in incognito/private browser)
> * Check that the page does not require login or subscription
> * Ensure the URL points to an article, not a homepage or category page
> * Try removing URL parameters (everything after `?` in the URL)
> * Verify the page loads correctly and contains text content
> * Check if the site has anti-scraping protection or blocking

> [accordion] Video is very short or missing content
>
> **Problem:** Generated video does not include all the article content.
>
> **Solution:**
>
> * Check if the article has substantial text content (300+ words)
> * Verify the URL points to the full article, not a preview or excerpt
> * Very long articles may be automatically summarized - consider this expected
> * Ensure article structure is clear (the API filters out ads and navigation)
> * Try a different article to test if it is a page-specific issue

> [accordion] Visuals Do Not Match Article Topic
>
> **Problem:** Selected stock visuals seem unrelated to article content.
>
> **Solution:**
>
> * Ensure article contains descriptive, visual language
> * Add more context about key concepts in the article
> * The AI selects visuals based on extracted text - review article wording
> * Consider that visuals may be thematic rather than literal
> * Try articles with clearer, more specific topics

> [accordion] Processing takes longer than expected
>
> **Problem:** Job status shows "in-progress" for extended periods.
>
> **Solution:**
>
> * Blog-to-video processing time depends on article length
> * Expected times:
>   * Short articles (300-500 words): 5-10 minutes
>   * Medium articles (500-1000 words): 10-15 minutes
>   * Long articles (1000-2000 words): 15-25 minutes
> * Complex page structures may take longer to parse
> * Check status every 5-10 seconds (not more frequently)
> * If stuck for over 30 minutes, contact support with job ID

> [accordion] Article is behind a paywall
>
> **Problem:** Cannot extract content from subscription or paywall-protected articles.
>
> **Solution:**
>
> * The API cannot access paywalled or protected content
> * Options:
>   * Copy article text and use the [Text to Video](https://docs.pictory.ai/guides/text-to-video/text-to-video-basic.md) endpoint instead
>   * Publish a public version of the article for video conversion
>   * Use article preview/excerpt if publicly available
> * For members-only content, make it temporarily public for processing

## Next Steps

Enhance your blog-to-video content with these features:

> [card] [Add Voice-Over](https://docs.pictory.ai/guides/article-to-video/blog-with-voiceover.md)
>
> Add AI narration to your blog videos

> [card] [Background Music](https://docs.pictory.ai/guides/advanced-features/background-music.md)
>
> Add music to complement your videos

> [card] [Brand Settings](https://docs.pictory.ai/guides/branding-customization/brand-settings.md)
>
> Apply consistent branding automatically

> [card] [Custom Captions](https://docs.pictory.ai/guides/text-to-video/text-to-video-captions.md)
>
> Customize or translate subtitles

## API Reference

For complete technical details, see:

* [Render Storyboard Video](https://docs.pictory.ai/api-reference/videos/render-storyboard-video.md) - Full API specification
* [Get Job Status](https://docs.pictory.ai/api-reference/jobs/get-video-render-job-by-id.md) - Monitor job status and progress


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.