Customize Browser User Agents for Screenshot Capture

The browser user agent defines how websites perceive your request. Use Add Screenshots to override the user agent header so you can trigger mobile layouts, QA outdated browsers, or bypass bot detection workflows while still routing captures to your preferred cloud storage.

Set the user_agent parameter in any API call, request template, or scheduled workflow. Add Screenshots applies the override immediately, captures from 20+ regions without throttling, and logs the result in usage analytics.

Test Custom User Agents Free or Compare Plans

Why Change the Browser User Agent?

Websites read the user agent string to tailor content, block bots, or serve region-specific experiences. Overriding it helps you:

  • Validate compatibility: Confirm legacy browsers such as Internet Explorer or embedded kiosks still render key journeys.
  • Capture gated UI states: Force mobile or app-like experiences for marketing collateral and QA.
  • Reduce false positives: Emulate common browsers to avoid bot challenges during automated monitoring.

For a deeper primer on the HTTP header itself, review the MDN user agent documentation or explore vetted strings on WhatIsMyBrowser.

API Example: Override the User Agent

Set any valid user agent string. The following request mimics Internet Explorer 6 and captures the resulting layout:

  

// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=
YOUR_API_KEY
&user_agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
&url=http://youtube.com

Your API key can be found on the API Keys page. Need an API Key? Sign up to get started.
For internal applications, replace YOUR_API_KEY with your own unique API Key.
For public facing websites or hotlinks, generate a signed URL.


Screenshot with User Agent

Best Practices for Custom User Agents

  • Escape special characters: URL encode spaces or symbols when passing the value as a query string.
  • Sync with navigation settings: Match the user agent with relevant platform navigation and viewport values for authentic results.
  • Allow for dynamic content: Pair with wait delays when pages load alternate templates after detection.

Troubleshooting Tips

If a site continues to block screenshots, enable &error=true to surface validation details inside the API response. You can also fall back to a known evergreen string (Chrome, Firefox, Safari) or schedule retries via webhook automation. For advanced diagnostics, visit the debug errors guide.

Automate Custom User Agents