ParallelFindAllTool()Run a Parallel FindAll discovery and return the matched candidates.
FindAll discovers entities from the web that satisfy a natural-language objective plus a set of boolean match conditions. Useful for lead generation, market mapping, and entity enumeration.
Setup:
export PARALLEL_API_KEY="your-api-key"
Key init args:
generator: Literal["preview", "base", "core", "pro"]
Discovery generator. Higher tiers find more candidates but
cost more and take longer. "preview" is a small free sample.
Invocation:
from langchain_parallel import (
ParallelFindAllTool,
FindAllMatchCondition,
)
tool = ParallelFindAllTool(generator="base")
result = tool.invoke({
"objective": "AI agent startups founded after 2023",
"entity_type": "company",
"match_conditions": [
FindAllMatchCondition(
name="founded_after_2023",
description="Was this company founded after January 1 2023?",
),
FindAllMatchCondition(
name="builds_ai_agents",
description="Does this company build AI agents as a core product?",
),
],
"match_limit": 25,
})
for candidate in result["candidates"]:
print(candidate["name"], candidate["url"])