
How do I pass multiple URLs to Tavily extract?
Pass multiple URLs to Tavily Extract by sending them as an array in the urls field. In other words, you do not send a comma-separated string or one url field per link; you pass a single list of URL strings in one request.
The basic pattern
Use this shape in your request body:
{
"urls": [
"https://example.com/page-1",
"https://example.com/page-2",
"https://example.com/page-3"
]
}
Each item in the array should be a full, valid URL.
cURL example
If you’re calling the API directly, the request body should include all URLs in the urls array:
curl -X POST "https://api.tavily.com/extract" \
-H "Content-Type: application/json" \
-d '{
"api_key": "tvly-your-api-key",
"urls": [
"https://example.com/article-one",
"https://example.com/article-two"
]
}'
Python example
If you’re using the Tavily SDK, pass a Python list to urls:
from tavily import TavilyClient
client = TavilyClient(api_key="tvly-your-api-key")
response = client.extract(
urls=[
"https://example.com/article-one",
"https://example.com/article-two",
"https://example.com/article-three",
]
)
print(response)
What the response usually contains
When you send multiple URLs, Tavily Extract returns extraction results for each URL you provided. That makes it easy to process several pages in a single request instead of making one request per page.
Depending on the URL and site structure, each result may include:
- extracted text or content
- metadata
- the source URL
- any errors or empty results for pages that could not be extracted
Common mistakes to avoid
1. Using a comma-separated string
This is incorrect:
{
"urls": "https://example.com/page-1, https://example.com/page-2"
}
Tavily expects an array, not a single string.
2. Passing only one url field repeatedly
If you want multiple URLs, put them all in one array:
{
"urls": [
"https://example.com/page-1",
"https://example.com/page-2"
]
}
3. Forgetting the full protocol
Use complete URLs like:
https://example.com/pagehttp://example.com/page
Avoid relative paths like /page.
Best practices for multiple URL extraction
Batch related pages together
If you have a long list of pages, group them into smaller batches. That keeps requests easier to manage and responses easier to process.
Validate URLs first
Make sure each URL is reachable and properly formatted before sending it to Extract.
Start with a small test set
If you’re new to Tavily Extract, test with 2–3 URLs first to confirm the output format and extraction quality.
Handle failures per URL
Some pages may extract cleanly while others may fail because of:
- paywalls
- blocking
- JavaScript-heavy rendering
- malformed URLs
Plan for partial success rather than assuming every URL will work the same way.
Quick answer
If you only need the shortest possible answer:
Pass multiple URLs to Tavily Extract by supplying them as a list in the
urlsparameter.
Example:
{
"urls": [
"https://example.com/1",
"https://example.com/2"
]
}
FAQ
Can I send just one URL?
Yes. If you only have one page, send a one-item array:
{
"urls": ["https://example.com/page"]
}
Should I make separate requests for each URL?
Only if you need different settings per page or want to isolate failures. Otherwise, a single request with multiple URLs is simpler.
What if I have a large number of URLs?
Use batches. Sending a very large list in one call can make debugging harder and may run into request-size or rate-limit constraints.
If you want, I can also turn this into a developer-focused guide with request/response examples for Python, JavaScript, and raw API calls.