Matched string in content failure responses

Responses triggered by fail_if_content_contains now identify the first visible string that matched.

Changelog 1 min read

Written by

Dmytro Krasun

Published on

Errors triggered by the fail_if_content_contains option now include the first visible string that matched in the matched_string response field.

For example, make the following request:

https://api.screenshotone.com/take?access_key=<API KEY>&url=https://example.com&fail_if_content_contains=Example%20domain

The API returns:

{
"is_successful": false,
"error_message": "The page content contains the specified string by the `fail_if_content_contains` option. If it seems to be a mistake or not what you expected, please, reach out to `support@screenshotone.com` as quickly as possible, and will assist and try to resolve your problem.",
"error_code": "content_contains_specified_string",
"documentation_url": "https://screenshotone.com/docs/errors/content-contains-specified-string/",
"matched_string": "Example Domain"
}

The match remains case-insensitive, while matched_string preserves the text as it appears on the page. If you specify multiple values, the field contains the first visible match found on the page.

See the fail_if_content_contains option documentation for more details.

Read more product updates

New features, bug fixes, and optimizations...

View all product updates
Stop scrolling screenshots when a given selector is visible

Stop scrolling screenshots when a given selector is visible

New options were added to the ScreenshotOne API to stop scrolling screenshots when a given selector is reached.

Read more

1 min read

Improving performance and stability by consolidating validation and access check logic in the API gateway

Improving performance and stability by consolidating validation and access check logic in the API gateway

For the past few days, I have been working on improving the stability and performance of the ScreenshotOne API. I started from low-hanging fruits—moving validations and access key management from rendering services to ScreenshotOne's API gateway. The API will be more stable and performant as a result. If you are curious why, please continue reading.

Read more

2 min read

Clearer usage limits and upgrade actions

Clearer usage limits and upgrade actions

Clearer usage limits, more links to Billing, and easier plan comparison.

Read more

1 min read

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.