BATCH API · HARD BUDGET LOCK

Concurrent Batch Extraction API (/v1/batch): Per-Row $0-on-Miss & Hard Micro-USD Budget Lock

Target Query: batch url table extraction api hard budget cap · Category: Batch & Scale · Verified Rate: $0.015/hit ($0 on miss) · Updated: 2026-12-02

Direct Answer: Running an AI agent across 50 supplier URLs in a loop creates two chronic failure modes: one CAPTCHA-blocked URL aborts the entire job (or still gets billed), and a misconfigured loop blows past your spend ceiling. `POST /v1/batch` runs concurrent table-waterfall extraction across heterogeneous items with **independent per-row `$0`-on-miss isolation** and a strict `max_cost_micros` budget guard that halts new billable work cleanly the instant your spend cap is reached.

Engineering Mechanics & Deterministic Guardrails

Batch Execution Guardrails (`POST /v1/batch`)

Batch ScenarioBehavior in `POST /v1/batch`Row BillingAggregate Safety
Mixed Verified + Blocked URLsVerified items succeed; fake-200 items flagged cleanlyOnly verified rows billedNever aborts healthy rows
SSRF URL Inside Batch ArrayMalicious item isolated as unbilled `ssrf_blocked`$0 for SSRF itemSafe for untrusted URL lists
`max_cost_micros` ReachedBudget guard stops further chargeable items cleanlyTotal spend `<= max_cost_micros`Zero runaway agent invoices
Repeated Same-Tenant URLsArchive cache serves repeats at 10% rate (`$0.0015`)90% discount on cached rowsFast concurrent completion
Zero-Friction Integration Coverage Across Developer & Autonomous Agent Surfaces REST JSON API (/v1/extract, /sitemap, /batch) OpenAPI 3.1 Native Remote MCP Server (/mcp) 6 Flat Tools treg hub QuickJS Package (0% Fee) $0.015 / $0 Miss Causal Bazaar Public Toll Card 15,000 micros Creem Prepaid Packs ($15/$59/$199) $0/mo Recurring Hard Budget Lock (max_cost_micros) Per-Request Cap

Batch Request With Shared Schema & Hard Spend Cap

{
  "type": "object",
  "required": [
    "items",
    "max_cost_micros"
  ],
  "properties": {
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object"
      }
    },
    "json_schema": {
      "type": "object"
    },
    "max_cost_micros": {
      "type": "integer",
      "minimum": 0
    }
  }
}

Any extracted payload violating required keys, types, bounds, or regex patterns returns schema_valid: false, exact validation_errors, and billed_micros: 0.

Executable REST, Remote /mcp & treg hub Snippets

curl -fsSL -X POST "https://scrape.fastmesh.dev/v1/batch" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {"url": "https://docs.python.org/3/"},
      {"url": "https://pypi.org/"},
      {"url": "http://127.0.0.1:9005/health"}
    ],
    "json_schema": {
      "type": "object",
      "required": ["title"],
      "properties": { "title": { "type": "string", "minLength": 1 } }
    },
    "max_cost_micros": 50000
  }'

curl -fsSL -X POST "https://scrape.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"scrape_batch","arguments":{"items":[{"url":"https://docs.python.org/3/"},{"url":"https://pypi.org/"}],"max_cost_micros":30000}}}'

Hard guarantee: fake-200 CAPTCHA/Turnstile shells, login walls, encrypted PDFs, empty results, schema mismatches, and SSRF HTTP 422 blocks always return billed_micros: 0.

Test Schema-Validated Extraction Live in 5 Seconds

Paste any public URL, HTML table, JSON-LD, CSV, or fake-200 shell at scrape.fastmesh.dev or top up once with never-expiring Creem prepaid credits ($15 Starter / $59 Growth / $199 Scale — $0/mo recurring).

Frequently Asked Questions

What happens if one item in a 20-URL batch triggers SSRF or a CAPTCHA?

That single row is marked unverified with `billed_micros: 0` and an explicit `blocked_reason`, while the remaining valid rows complete normally.

How strict is `max_cost_micros` on `/v1/batch`?

The ApprovalBudgetGuard enforces a hard ceiling: `total_billed_micros` is guaranteed never to exceed `max_cost_micros`.

Can I apply one shared `json_schema` across every item in a batch?

Yes. Supply a top-level `json_schema` for uniform validation, or override per-item schemas when batching heterogeneous sources.

Related Structured Extraction Guides

Explore all 32 Scrape-Anything Technical Guides or inspect the machine-readable llms.txt index.