Selector
selector.fb-postCreate a screenshot of a Facebook post.
With this HTML you can generate a screenshot from any public Facebook post.
This uses the Facebook embed code. Simply swap the link in the HTML with the link to a Facebook post and it will show it.
Take note of the selector and ms_delay parameters. They must be set correctly for this image to render properly.

Interactive example
Change the HTML, CSS, or API options. The browser preview updates as you edit; select Image to render the final output through the API.
Example code
Choose a language and copy a complete request using this example's HTML, CSS, and API options.
# pip install requests
import os
import requests
request = {
"html": """
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v11.0" nonce="SOhYrMAR"></script>
<!-- See data-href below. Replace that with the link to your Facebook post -->
<!-- set ms_delay: 2500 to give it extra time toload -->
<!-- set selector: .fb-post -->
<div class="fb-post" data-href="https://www.facebook.com/HermanMiller/photos/a.171562157561/10158261466927562" data-width="500" data-show-text="true"></div>
""",
"ms_delay": 2500,
"render_when_ready": False,
"selector": ".fb-post",
}
response = requests.post(
"https://hcti.io/v1/image",
auth=(os.environ["HCTI_API_ID"], os.environ["HCTI_API_KEY"]),
json=request,
timeout=30,
)
response.raise_for_status()
result = response.json()
print(result["url"])
Request configuration
These values are sent with the HTML and CSS to control how HCTI loads the page and captures the final screenshot. You can change each one in the editor above.
selector.fb-postms_delay2500From code to screenshot
HTML/CSS to Image renders HTML and CSS in hosted Chrome, then captures the result as an image or PDF. Each example combines real source code with the API options used for the render, so it is both a working demo and a starting point for your own request.
Edit the source and options above to test changes in the browser, then render through the API to see the production result.
Yes. Open an example to inspect and edit its complete HTML, CSS, and render options. Use it as a starting point, then send the resulting request from your application.
Examples are complete API requests built from HTML and CSS. Templates are saved, reusable designs created in the visual editor and rendered repeatedly with different variable values.
Yes. HCTI can render HTML and CSS or capture a public webpage as an image, and it can generate PDFs when you need document output instead of a screenshot.
Send the example’s HTML, CSS, and request options from your application.
Use HCTI with MCP-enabled AI tools, Zapier, Make, and other automation platforms.
Start with a visual preset, customize it in the template editor, and render it repeatedly with dynamic values.
Keep exploring
Social card with a fun SVG background and highlighted text.
Explore example