Registry / llm-agents / linkup-sdk

linkup-sdk

JSON →
library0.18.2pypypi✓ verified 85d ago

The Linkup Python SDK provides a client for interacting with the Linkup API, enabling capabilities like web search and content fetching for AI workflows. It supports both synchronous and asynchronous calls, manages authentication, and offers integration with the x402 payment protocol. The library is actively maintained with frequent releases, currently at version 0.13.0.

pip install linkup-sdk
INSTALL
IMPORT
SIG · LINKUP-SDK
L
linkup-sdk
llm-agentspythonv0.18.2
Install
6.0s avg
Import
621ms
Disk
57MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.18.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.642s · 96.4MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 6.0s · import 0.599s · 32MB
57MB installed
● package 57MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LinkupClient
from linkup import LinkupClient
from linkup_sdk import LinkupClient
The top-level package for import is `linkup`, not `linkup_sdk`.

Initializes the LinkupClient and performs a basic search query, retrieving a sourced answer. It demonstrates how to handle the API key, preferably from an environment variable.

import os from linkup import LinkupClient # Ensure LINKUP_API_KEY environment variable is set or pass directly api_key = os.environ.get('LINKUP_API_KEY', '') if not api_key: print("Warning: LINKUP_API_KEY environment variable not set. Please set it or pass 'api_key' to LinkupClient.") # For demonstration, you might want to exit or use a placeholder, # but for actual use, a valid key is required. # For example: api_key = 'YOUR_ACTUAL_API_KEY' try: client = LinkupClient(api_key=api_key) response = client.search( query="What are the benefits of using an LLM in a RAG system?", depth="standard", output_type="sourcedAnswer" ) print(response.answer) for source in response.sources: print(f"- {source.name}: {source.url}") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingInternal error handling logic was moved in v0.12.0. If you were relying on catching specific internal exceptions or inspecting their structure, your code might break.
fix
Review your exception handling blocks. Ensure you are catching `linkup.exceptions.LinkupAPIError` or more specific `linkup.exceptions` classes, and adapt to the new error structures if necessary.
affects: >=0.12.0
breakingInternal modules were made private in v0.8.0. Direct imports from `linkup._internal.*` or similar paths are no longer supported and will raise an `ImportError` or `AttributeError`.
fix
Refactor your code to only use documented public interfaces (e.g., `from linkup import LinkupClient`). Avoid importing from modules prefixed with an underscore or located in internal subdirectories.
affects: >=0.8.0
gotchaFor optimal performance in production environments, especially when making multiple API calls, consider using the asynchronous client methods (e.g., `async_search` instead of `search`).
fix
Use `async def` functions and `await client.async_search(...)` in an `asyncio` event loop for non-blocking operations.
affects: All versions
gotchaThe Linkup API Key is crucial for authentication. It must be provided either via the `LINKUP_API_KEY` environment variable or passed directly as the `api_key` argument to the `LinkupClient` constructor.
fix
Set `export LINKUP_API_KEY='your_api_key'` in your shell, or ensure `os.environ['LINKUP_API_KEY'] = 'your_api_key'` is called before `LinkupClient()`, or initialize with `LinkupClient(api_key='your_api_key')`.
affects: All versions
Errors
Common errors & fixes
ImportError: cannot import name 'LinkupClient' from 'linkup_sdk'
Attempting to import `LinkupClient` from `linkup_sdk` instead of `linkup`.
fix
Change the import statement to `from linkup import LinkupClient`.
linkup.exceptions.AuthenticationError: Missing API key. Please provide it as an environment variable (LINKUP_API_KEY) or pass it directly to the LinkupClient constructor.
The Linkup API key was not found in environment variables nor passed during client initialization.
fix
Set the `LINKUP_API_KEY` environment variable, or pass `api_key='your_key_here'` when creating `LinkupClient`.
linkup.exceptions.LinkupAPIError: Rate limit exceeded. Please wait before making further requests or contact support for higher limits.
Too many API requests were made within a short period, exceeding the allocated rate limit.
fix
Implement exponential backoff and retry logic in your application. Review Linkup's rate limit documentation for details, or contact Linkup support to request a higher rate limit.
TypeError: LinkupClient.search() got an unexpected keyword argument 'source_filter'
Attempting to use a parameter name that either does not exist or has been renamed in a newer version of the SDK.
fix
Consult the official Linkup SDK documentation or the GitHub repository's `CHANGELOG.md` for the correct parameter names and usage for your installed version. Parameter names and available options (e.g., `depth`, `output_type`) can evolve.
Upgrade
Version history
0.18.2latest on PyPI · released Jun 4, 2026
Audit
Dependencies
python-dotenvoptionalOptional: For loading API keys from .env files.
Agent activity
22 hits · last 30 days
node
20
Resources
linkup-sdk — pip install linkup-sdk · libregistry