Html To Png Actor
by rmed19
Instantly capture pixel-perfect PNG screenshots of any webpage. Perfect for automation, documentation, and monitoring—just provide a URL.
Opens on Apify.com
About Html To Png Actor
Need a dead-simple way to take perfect, pixel-accurate screenshots of any webpage? This actor does exactly that. It’s my go-to for converting HTML to PNG when I need reliable, automated captures. Whether you're building a dashboard that needs fresh visual snapshots of live sites, creating documentation that requires up-to-date images, or monitoring a competitor's homepage for design changes, this tool just works. You give it a URL, and it fetches the page, renders it fully (yes, it handles JavaScript), and hands you back a clean PNG file. I've used it to batch-capture screenshots for client reports and to generate thumbnails for archived web content. It saves me the hassle of manually taking and cropping screenshots, and the output is consistently what I expect. If you've ever fought with a headless browser config just to get one clean image, you'll appreciate how straightforward this actor makes the whole process.
What does this actor do?
Html To Png Actor is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
Html To Png Actor
An Apify Actor that captures PNG screenshots from webpages. You provide a URL and optional dimensions, and it returns a PNG image stored in the Apify Key-Value Store.
Key Features
- Captures a screenshot from a single provided URL.
- Configurable browser viewport width and height.
- Output is saved to the run's Apify Key-Value Store.
- Screenshots are automatically purged after 7 days.
Input Configuration
Configure the actor run using these input parameters:
{
"url": "https://apify.com?fpr=python_automation",
"width": 1280,
"height": 720
}
url(string, required): The webpage URL to capture.width(integer, optional): Browser viewport width in pixels. Defaults to1280.height(integer, optional): Browser viewport height in pixels. Defaults to720.
How to Use
Here's an example using the Apify Python Client to run the actor and download the screenshot.
from apify_client import ApifyClient
import time
# Initialize the client
client = ApifyClient("your_apify_api_token")
# Set up the actor input
run_input = {
"url": "https://example.com",
"width": 1024,
"height": 768,
}
# Execute the actor
run = client.actor("your_actor_id").call(run_input=run_input)
# Access the key-value store for this run
store_client = client.key_value_store(run['defaultKeyValueStoreId'])
# Generate a filename and retrieve the screenshot
screenshot_key = f"screenshot-{int(time.time())}-{run_input['url'].replace('https://', '').replace('http://', '').replace('/', '_')}.png"
record = store_client.get_record_as_bytes(screenshot_key)
if record is not None and 'value' in record:
with open(screenshot_key, "wb") as f:
f.write(record['value'])
print(f"Saved {screenshot_key}")
else:
print(f"No record found for key: {screenshot_key}")
Output
The actor generates a single PNG screenshot file. The image is stored in the run's default Key-Value Store. You can retrieve it via the Apify Client using the store ID from the run details, as shown in the usage example.
License
This actor is closed-source. Unauthorized use, distribution, or modification is prohibited. Contact the project owner for licensing inquiries.
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Html To Png Actor now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- rmed19
- Pricing
- Paid
- Total Runs
- 736
- Active Users
- 16
Related Actors
Web Scraper
by apify
Cheerio Scraper
by apify
Website Content Crawler
by apify
Legacy PhantomJS Crawler
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support