ApiFlash can capture a webpage as an image, but it does not automatically design a branded social card from a title and theme. To create an Open Graph preview image, first render the card on a page, capture that page with ApiFlash, make the resulting image publicly reachable, and set its URL in the shared page’s og:image metadata.
Choose what ApiFlash should capture
ApiFlash’s /v1/urltoimage endpoint captures a rendered webpage in Chrome. It is not a card-template generator. If you capture an ordinary page, the screenshot reflects that page’s layout. For a consistent, designed preview, create a dedicated page that displays the card at the dimensions you want to publish, then capture that page.
As an Amazon Associate I earn from qualifying purchases.
Capture an existing page
Use this when the page already looks suitable as a preview and you do not need a separate social-card design. Review the resulting image carefully: viewport size, page layout, and capture settings affect what appears.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteCapture a dedicated card page
Use this when you need precise control over branding, typography, colors, and composition. Build a page that renders only the intended card, and ensure it is reachable by ApiFlash. A dedicated route makes the output more predictable than capturing a full article page.
#1 Best Overall
- Capture Stunning Footage - Osmo Pocket 3 vlogging camera features a 1-inch CMOS sensor and records in 4K resolution at an impressive 120fps. Capture breathtaking night views and sunsets with enhanced clarity.
- Effortlessly Frame Your Shots - Get the ideal composition with Osmo Pocket 3's expansive 2-inch touch screen that rotates for both horizontal and vertical shooting.
- Ultra-Steady Footage - Say goodbye to shaky videos! Osmo Pocket 3's advanced 3-axis mechanical stabilization delivers superb stability. Enjoy smooth footage while dancing, chasing pets, or hiking.
- Create Captivating Vlogs With ActiveTrack 6.0 - Stay effortlessly in focus as you record on the go. Set Osmo Pocket 3 up on a tripod and jump, dance, or spin, but remain center-frame.
- Fast and Accurate Focusing - Osmo Pocket 3 digital camera locks onto your subject for sharp, clear footage. Whether filming action-packed scenes or still shots, it ensures every detail is captured.
Call the ApiFlash endpoint
Requests go to https://api.apiflash.com/v1/urltoimage. Supply a valid access key and a complete target URL beginning with http:// or https://. The API accepts GET requests with query parameters or POST requests with form data. Encode parameter values when needed.
Example GET request
Replace the key and URL with your own. This request saves the default image response to a file:
curl -G "https://api.apiflash.com/v1/urltoimage"
--data-urlencode "access_key=YOUR_API_KEY"
--data-urlencode "url=https://example.com/social-card"
--data-urlencode "width=1200"
--data-urlencode "height=630"
--data-urlencode "format=png"
-o preview.png
The width and height here set the browser viewport; they are not a universal Open Graph requirement. Choose dimensions based on the design and the platforms where the preview will appear. The Open Graph protocol itself does not prescribe one image size for every social network.
Rank #2
- 🎥 【4K Digital Camera for Vlogging-Made for Beginners & First-Time Content Creators】Shoot stunning 4K video and capture 75MP photos for clear, shareable content. Create eye-catching videos without complicated settings. This easy-to-use camera is perfect for YouTube, TikTok, travel vlogs, and daily recording. Fast autofocus and a wide-angle lens ensure sharp and stable footage
- 🌍【 Portable Pocket Camera for Travel & Daily Use】Compact and lightweight, this portable camera easily fits in your pocket—perfect for travel, vacations, outdoor trips, hiking, and everyday life recording. Capture high-quality moments anytime, anywhere
- 🎬【Perfect for Solo Vlogging】Film yourself with confidence using the unique 330° rotating lens. Create travel vlogs, daily videos and outdoor content with natural-looking framing and less camera adjustment. Also supports time-lapse, slow motion and interval shooting for more creative storytelling.
- 📱【WiFi Digital Camera for Content Creators】Built-in WiFi lets you wirelessly transfer photos and videos to your smartphone for quick editing and sharing. Perfect for YouTube, TikTok and social media content.
- 📦 【 Vlogging Camera Kit with Accessories & Warranty】Comes with essential accessories so you can start filming immediately—no extra setup needed. Includes a camera, 16GB TF card, mini tripod, charging cable, wrist strap, and travel carrying bag. A perfect beginner camera kit, backed by 24/7 support and a 1-year warranty
POST requests and response modes
ApiFlash also accepts POST requests with form data. By default, the response body is the screenshot image. If you set response_type=json, the response includes a link to the screenshot; JSON mode can also return extracted HTML or text when requested. Use the response mode that fits your publishing pipeline, and ensure any image URL you place in metadata is publicly fetchable by the services that generate previews.
Set capture dimensions and output
The documented defaults are a 1920 × 1080 viewport, JPEG output, image response, and a screenshot-cache time-to-live of 24 hours. Supported image formats are JPEG, PNG, and WebP. ApiFlash also documents quality controls for JPEG and WebP, viewport dimensions, full-page capture, and element capture.
- Viewport:
widthandheightdescribe the browser viewport used to render the page. The rendered image depends on the page’s layout and these settings. - Format: Choose JPEG, PNG, or WebP according to your compatibility and file-size needs. JPEG and WebP have documented quality controls.
- Full page: Set
full_page=trueto capture the full page; when enabled, theheightparameter is ignored. - Element: Use
elementwith a CSS selector to capture the first matching element. This can target a card on a larger page, though a dedicated card page can be easier to control. - Freshness: The
freshoption bypasses ApiFlash’s screenshot cache when you need a new capture.
ApiFlash documents a combined pixel-area limit for width and height. Check its current API reference for the precise bounds and current parameter restrictions before relying on a particular size: ApiFlash API documentation.
Rank #3
- Capture Stunning Footage - Osmo Pocket 3 vlogging camera features a 1-inch CMOS sensor and records in 4K resolution at an impressive 120fps. Capture breathtaking night views and sunsets with enhanced clarity.
- Effortlessly Frame Your Shots - Get the ideal composition with Osmo Pocket 3's expansive 2-inch touch screen that rotates for both horizontal and vertical shooting.
- Ultra-Steady Footage - Say goodbye to shaky videos! Osmo Pocket 3's advanced 3-axis mechanical stabilization delivers superb stability. Enjoy smooth footage while dancing, chasing pets, or hiking.
- Create Captivating Vlogs With ActiveTrack 6.0 - Stay effortlessly in focus as you record on the go. Set Osmo Pocket 3 up on a tripod and jump, dance, or spin, but remain center-frame.
- Fast and Accurate Focusing - Osmo Pocket 3 digital camera locks onto your subject for sharp, clear footage. Whether filming action-packed scenes or still shots, it ensures every detail is captured.
Wait for the card to render
If the design is rendered asynchronously—for example, after JavaScript loads data—avoid assuming that a fixed delay will always be sufficient. ApiFlash recommends using wait_for or wait_until when suitable. Its documented fixed-delay range is 0–10 seconds. A wait_for selector wait aborts with an error if the selector does not appear within 15 seconds.
For a card page, wait for a selector that only exists once the finished card is visible, such as #social-card. For other readiness conditions, consult the API reference for supported wait_until values. A selector wait can fail if the selector is wrong, never becomes visible in the page, or appears after the documented timeout.
Publish the image URL in Open Graph metadata
Once the image is stored at a stable, publicly accessible URL, add Open Graph tags to the HTML of the page being shared. The protocol specifies four required properties: og:title, og:type, og:image, and og:url. Open Graph protocol describes og:image as the image representing the page.
Rank #4
- 【4K Video & 64MP Photos】——Capture sharp Ultra HD footage and detailed high-resolution images with this 4K digital camera, designed for everyday shooting and creative recording. It works perfectly as a 4K digital camera for photography, helping you preserve travel memories, daily life, and special moments with clear and vibrant results.
- 【WiFi Sharing Made Easy】——Built-in WiFi allows remote control, live preview, and fast wireless transfer to your smartphone, so you can edit and share instantly without extra cables. Whether posting online or creating content, it functions smoothly as a vlogging camera for YouTube and a convenient tool for modern creators.
- 【180° Flip Screen for Selfies & Vlogs】——The 180° flip screen makes switching between selfies and regular shooting effortless, giving you flexible angles for travel videos, social media clips, and daily recording. Designed with simplicity in mind, it delivers an easy point and shoot digital camera experience for users of all skill levels.
- 【Beginner-Friendly Autofocus】——Fast autofocus and intuitive button layout help reduce guesswork, allowing new users to capture sharp images confidently. This makes it a reliable digital camera for teens and beginners who want to start shooting right away without complicated manual settings.
- 【Small, Compact & Travel Ready】——Lightweight and easy to carry, this small digital camera features a portable compact camera design that fits naturally into everyday travel and daily use. Ideal for spontaneous shooting, outdoor trips, or casual photography wherever you go.
<meta property="og:title" content="Example article title">
<meta property="og:type" content="website">
<meta property="og:url" content="https://example.com/article">
<meta property="og:image" content="https://example.com/images/article-preview.png">
<meta property="og:image:alt" content="A description of the preview image">
Use a type appropriate to the page rather than copying website automatically. The image URL should identify the actual image file and be retrievable by the preview consumers. Optional structured image properties include width, height, MIME type, secure URL, and alternative text.
Store the image and protect your API key
If you use the default image response, save the returned bytes to storage that serves the image at a public URL, then place that URL in og:image. If you use JSON mode, use the screenshot link as documented and confirm it remains suitable for your publishing setup. The shared page’s metadata and its image URL must both be available to the systems that fetch the preview.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteKeep a private API key out of public client-side code. ApiFlash’s guides index includes material on hiding the key behind Nginx or a Cloudflare Worker, downloading screenshots, concurrent calls, overlays, and authenticated pages: ApiFlash guides. Follow the relevant guide for implementation details rather than exposing a secret in browser JavaScript.
Best Value
- 【Mini Camcorder, Pocket Size Design】: Measuring only 5.35 × 1.56 inches, this handheld video camera easily fits in your pocket or bag. Designed for travel, daily recording, and spontaneous moments, it delivers a simple way to capture life anywhere.
- 【One-Button Recording, Ready Out of the Box】: Start recording instantly with no app download, no QR code, and no complicated setup. Includes a 32GB memory card, making this mini video camera perfect for beginners, travelers, and everyday creators.
- 【7-Hour Long Battery Life】: Built-in 2000mAh rechargeable battery supports up to 7 hours of continuous recording. Ideal as a travel camcorder, handheld video camera, outdoor recorder, or long-form vlogging camera without frequent charging.
- 【180° Rotating Lens for Vlog & Self Recording】: 180° Rotating Lens for POV & Self-Recording((manual rotation required),Capture POV shots, selfies, and hands-free style videos with the flexible rotating lens. A compact alternative to bulky cameras for content creators, travelers, and anyone who enjoys simple everyday recording.
- 【Designed for Everyday Moments】:While it is not designed to deliver DSLR-level image quality, its charm lies in capturing effortless and fun moments.This compact camera is made for simple and fun everyday recording, travel memories, and creative moments. For users looking for an easy-to-carry camera rather than bulky professional equipment. CGXUED products include an 18-month warranty and lifetime technical support. Have any questions? Just contact customer service!
Check the generated preview
- Open the captured image and verify the card’s text, crop, dimensions, and visual appearance.
- Fetch the image URL without authentication to confirm it is accessible to intended preview consumers.
- Inspect the shared page’s served HTML and confirm its four required Open Graph properties point to the intended title, type, URL, and image.
- If the page or card changed, use ApiFlash’s
freshoption to bypass its screenshot cache when generating a replacement. - Check the preview again through the platform where it will be shared. ApiFlash’s capture cache and each social platform’s metadata or image cache are separate; a fresh screenshot does not guarantee a platform immediately refetches changed metadata.
Common problems and fixes
- Missing or invalid access key: Confirm the request includes a valid
access_key. Keep it on the server side rather than exposing it in public page code. - Target URL is rejected or unavailable: Supply a complete URL with
http://orhttps://and confirm the target page is reachable by the capture service. - Card content is absent: The page may render after the screenshot begins. Use a suitable
wait_forselector orwait_untilcondition; a fixed delay is limited to the documented 0–10-second range. - Selector wait fails: Check that the CSS selector matches an element on the rendered page and that it appears within the 15-second selector-wait limit.
- Only part of the page is captured: Use a viewport that fits the card, or use
full_page=trueif the intended output is the whole page. Full-page mode ignores the supplied height. - Image looks different from the design: Check the viewport dimensions, responsive breakpoints, page fonts and assets, and whether the capture targets the intended element. The API captures the rendered page rather than composing a card for you.
- Updated image does not appear in a share preview: Bypass ApiFlash’s screenshot cache with
freshwhen recapturing, then verify the new public URL and metadata. A platform can cache preview data independently, and the cited protocol does not specify a universal refresh procedure.
Or skip the browser setup
If your aim is a screenshot of a rendered page rather than specifically using ApiFlash, ScreenshotNeo offers a one-call screenshot API. It does not automatically design a branded card either: provide a page that renders the design, then use the resulting image URL in your metadata.
cURL example, adapted to your card page:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/social-card -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts and removes cookie/consent banners, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers say which page verdict and billing status applied. Its MCP server provides screenshot tools for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Does the Open Graph protocol require a particular preview-image size?
No universal image dimensions are specified by the protocol; choose dimensions for the design and intended platforms.
Does ApiFlash generate the social-card design from text?
No. It captures a rendered webpage, so create and style the card page or element first.
Does setting ApiFlash to fresh clear a social platform’s cached preview?
No. It bypasses ApiFlash’s screenshot cache, not separate caches maintained by platforms.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




