tinyx402

Agent run

Give a start URL and a goal in plain language. A TinyFish web agent operates a real browser (navigating, clicking, filling forms) and returns a structured JSON result.

POST/api/v1/agent/run50000 base units · 0.05 USDT

Body

FieldType
urlstringRequired. Start URL.
goalstringRequired. What to do and what to return.
output_schemaJSON SchemaOptional. Shapes result predictably.
browser_profilelite | stealthstealth uses an anti-detection browser.
agent_config.modedefault | strictstrict fails fast.
agent_config.max_stepsinteger1–500.
agent_config.max_duration_secondsintegerCapped at 280 seconds so the run fits inside one request. Use strict mode or fewer steps for long tasks.
proxy_config{ enabled, country_code? }Route the run through a country.

Vault credentials, browser profiles and webhooks are scoped to the operator's account, so they are not exposed. Unknown fields are dropped.

Example

ts
const res = await paidFetch("https://your-domain.com/api/v1/agent/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    url: "https://news.ycombinator.com",
    goal: "Return the top 3 stories with title, url and points.",
    output_schema: {
      type: "object",
      properties: {
        stories: {
          type: "array",
          items: {
            type: "object",
            properties: { title: { type: "string" }, url: { type: "string" }, points: { type: "integer" } },
            required: ["title", "url"],
          },
        },
      },
      required: ["stories"],
    },
  }),
});

Response

json
{
  "run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "COMPLETED",
  "started_at": "2026-11-06T10:00:00Z",
  "finished_at": "2026-11-06T10:00:31Z",
  "num_of_steps": 5,
  "result": { "stories": [{ "title": "…", "url": "https://…", "points": 412 }] },
  "error": null
}

A run with status: "FAILED" is returned as 502 with its error (code, message, category) and is not charged.

Want live progress? Use Agent run (SSE).