Skip to main content
POST
Estimate Fix It Everywhere
Use this API to estimate how many pages a fix-it-everywhere run would touch before you start it, for a step such as “Found on about 12 pages. Apply everywhere?”. The fix-it-everywhere agent takes one text edit, the text to find and optionally its replacement, and pins the same edit on every other copy of that text across a site. The body describes the run the way Run Execution does: its site url, its optional page list urls, and its userContext. The estimate reads the first few pages of the list and counts the copies of the search text. Nothing runs, nothing is pinned, and nothing is billed. Available on V2 only.

Endpoint

POST https://api.velt.dev/v2/agents/fix-it-everywhere/estimate

Headers

string
required
Your API key.
string
required

Body

Params

object
required
The schema uses .strict(): unknown fields are rejected, so do not send the rest of a Run Execution body, such as agentId or documentId. Pages are read as plain HTML through the same guard that keeps agents on public addresses, a few at a time, within about 6 seconds, plus up to 6 seconds to read the sitemap when there is no urls list. A page that does not answer in time, or answers with something other than HTML, is left out.

Example Requests

1. Estimate over a page list

2. Estimate from the site’s sitemap

Response

Success Response

This is an estimate, not a preview of the run. The pages are read as static HTML rather than rendered, so text a script writes is missed, and a hidden copy, such as a phone menu’s duplicate, is counted even though the run skips it. The run does its own matching on the rendered pages.

Failure Response

Errors: INVALID_ARGUMENT for:
  • a body outside the schema: an invalid url (A valid URL is required), more than 500 urls, maxPages outside 1..20, a missing userContext, or an unknown field;
  • a search the run would refuse: userContext.findText is required: the text to look for on every page., userContext.findText must be 2 to 200 characters., userContext.findText is too common to look for on every page. Use a longer, more specific phrase., or A Fix It Everywhere userContext field has the wrong type: <key>;
  • a urls list with no page on the site (No usable pages in the list: every entry was blank, off-site or invalid.).