Documentation
MS Delay Parameter
The ms_delay
parameter adds a delay (in milliseconds) before capturing the screenshot, allowing time for animations, dynamic content, or resources to load.
Specifications
Property | Value |
---|---|
Type | integer |
Required | No |
Default | null |
Range | 1-5000 |
API | Both HTML/CSS and Screenshot APIs |
Description
The MS Delay parameter:
- Adds a specified delay before capturing the screenshot
- Useful for waiting for animations to complete
- Helps ensure dynamic content is fully loaded
- Can be used to capture specific states of interactive elements
Adding a delay increases the total processing time of your request. Only use delays when necessary, and keep them as short as possible for your use case.
Examples
Waiting for Animation
{
"html": "<div class='animate-fade-in'>Content with animation</div>",
"ms_delay": 1000
}
Capturing Slow Loading Sites
{
"url": "https://example.com/slow-page",
"ms_delay": 2000
}
Minimal Delay
{
"html": "<div>Simple content with short delay</div>",
"ms_delay": 100
}