﻿# Tavily Extract batches need per-URL success handling

Reconcile Tavily Extract batches per URL, including partial failure and all-failed HTTP success, without associating bodies by response position.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-tavily-extract-partial-success/
Language: en

## Start from a selected URL ledger

A comparison worker selects several supplier policy pages from search results. Save that list before extraction, with a local record for every requested address. This ledger defines the expected work. It also prevents later code from interpreting a shorter response as proof that the omitted pages had no relevant policies.

## Inspect both response collections

The [Extract reference](https://docs.tavily.com/documentation/api-reference/endpoint/extract) separates successful `results` from `failed_results`. It explicitly says to inspect both even when HTTP succeeds. A client that stops after decoding JSON can otherwise mark every page complete while silently discarding the failed subset. Keep the request identifier with those outcomes for diagnosis.

## Reconcile by URL rather than position

The same reference does not guarantee output order. Associate a returned body with its URL, not with the corresponding position in the submitted array. If a supplier's privacy policy fails between two successful pages, positional zipping can attribute the next supplier's text to the wrong organization. That is a factual corruption, not merely a missing document.

Account for duplicate submitted addresses according to an explicit local rule. Either deduplicate before sending while preserving aliases, or retain separate local requests mapped to the same provider identity. Do not let the response array length implicitly decide how those records relate.

## Separate all-failed from no matches

Extract can return successful HTTP with empty `results` when all valid URLs fail. That means acquisition failed, not that the preceding search found nothing. The [Search reference](https://docs.tavily.com/documentation/api-reference/endpoint/search) belongs to the discovery stage; preserve its candidate list independently so the application can explain exactly where coverage was lost.

## Retry the unresolved subset

[Extract best practices](https://docs.tavily.com/documentation/best-practices/best-practices-extract) describes curating selected URLs. Extend that selection process to retries: retain successful bodies and reconsider only unresolved pages under the application's retry policy. Keep a diagnostic failure distinct from a completed page whose content simply lacks the requested fact.

The existing guides to [tool observations](/journal/learn-codex-tool-observation/) and [bounded probes](/journal/provider-bounded-synthetic-probe-contract/) help structure verification. Stored fixtures should include reordered results, partial failure, and all-failed output. Check that every requested URL reaches an explicit outcome and that no successful body's attribution changes when a neighbor fails.
