Linkup web search and fetch tools for Strands Agents. Give your agent real-time, citable web results and clean page content in two lines. 🔗
- 🔍
linkup_search: real-time web search returning sources (title, URL, content) or a sourced answer. - 📄
linkup_fetch: fetch any URL as clean markdown, with optional JavaScript rendering. - 🎚️ Four search depths: from
flash(lowest latency) todeep(multi-step agentic search). - 🧭 Filters: include/exclude domains, date ranges, and result limits.
- ⚡ Async-native: both tools are async
@toolfunctions that run concurrently with the rest of your agent's tool calls.
pip install strands-linkup-
🔑 Obtain an API Key: sign up at app.linkup.so to get your API key.
-
⚙️ Set the API Key: export the
LINKUP_API_KEYenvironment variable before running your agent (or set it withos.environ/ a.envfile loaded by python-dotenv).export LINKUP_API_KEY='YOUR_LINKUP_API_KEY'
from strands import Agent
from strands_linkup import linkup_fetch, linkup_search
agent = Agent(tools=[linkup_search, linkup_fetch])
agent("What are the latest developments in solid-state batteries? Cite your sources.")The agent uses whichever model you configure for Strands (Amazon Bedrock by default). See the Strands model providers docs to use another provider.
Strands lets you call a tool directly, without going through the model:
result = agent.tool.linkup_search(
query="Strands Agents SDK release notes",
depth="standard",
max_results=5,
)
answer = agent.tool.linkup_search(
query="Who won the 2026 Tour de France?",
output_type="sourcedAnswer",
)
page = agent.tool.linkup_fetch(url="https://docs.linkup.so", render_js=False)Both tools return the standard Strands tool result shape:
{"status": "success" | "error", "content": [{"text": "..."}]}. On success, the text is JSON.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str |
required | The search query, in natural language. |
depth |
str |
"standard" |
"flash", "fast", "standard" or "deep". |
output_type |
str |
"searchResults" |
"searchResults" for raw sources, "sourcedAnswer" for an answer + sources. |
include_domains |
list[str] |
None |
Only return results from these domains. |
exclude_domains |
list[str] |
None |
Never return results from these domains. |
from_date |
str |
None |
Only results published on or after this date (YYYY-MM-DD). |
to_date |
str |
None |
Only results published on or before this date (YYYY-MM-DD). |
max_results |
int |
None |
Maximum number of results to return. |
Output JSON:
searchResults:{"results": [{"type": "text", "name": ..., "url": ..., "content": ...}, ...]}sourcedAnswer:{"answer": ..., "sources": [{"name": ..., "url": ..., "snippet": ...}, ...]}
Choosing a depth:
flash: lowest latency, ranked sources and snippets.fast: one-shot retrieval in about a second.standard: a single pass of agentic search, the right choice for most queries.deep: several search iterations for complex, multi-step questions. Slower (can take 5-30s).
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
str |
required | The URL of the web page to fetch. |
render_js |
bool |
False |
Render the page's JavaScript before extracting content. |
Output JSON: {"url": ..., "markdown": ...}
See the examples/ directory for a runnable research agent.
make install-dev # install dependencies and pre-commit hooks
make test # lint, type-check and run unit testsMIT. See LICENSE.