Start from the operation
A capture endpoint returns an artifact. Analyze returns documented structured insight. Compare accepts two states and returns before, after, diff, and metrics. Selecting an endpoint by version number without naming the result leads to copied fields and unclear behavior.
Read the current contract and create a typed application model that exposes only what the product needs.
Core capture state
URL identifies the target but does not make it authorized. Validate destination at your server boundary. Format selects the artifact. Width and height define responsive viewport, while fullSize chooses visible frame or scrollable document.
Readiness and cleanup require evidence. Add delay only when a measured wait solves a known page state. Use cookie cleanup or selectors only when those elements fall outside the artifact's purpose.
Advanced preparation and analysis
Custom JavaScript changes the rendered page and therefore belongs to a reviewed advanced workflow. Store the script revision with the output. Analysis and comparison fields have separate response contracts; do not mix them into a generic capture object.
Reject or surface unknown fields rather than assuming the provider ignores them. This catches spelling errors and stale client code.
Keep the final request, endpoint operation, response status, artifact reference, and capture time together. Use response formats for output selection and best practices for the production boundary.