--- title: Linkup Search Tool emoji: ๐ŸŒ– colorFrom: purple colorTo: blue sdk: gradio sdk_version: 5.27.1 app_file: app.py pinned: false tags: - smolagents - tool --- # ๐Ÿ” Linkup Web Search Tool The **Linkup Search Tool** is a [SmolAgents](https://github.com/huggingface/smolagents)โ€“compatible tool that allows agents to search the public and premium web in real-time using the [Linkup API](https://linkup.so). Powered by advanced depth-aware search logic (`standard` vs `deep`), this tool is ideal for retrieving up-to-date insights, articles, and structured search summaries โ€” all within your SmolAgents or Python workflows. --- ## ๐Ÿš€ Features - ๐ŸŒ **Web-wide, real-time search** via Linkup API - ๐Ÿง  Supports **depth-aware querying** (`standard` or `deep`) - ๐Ÿค– Compatible with `smolagents.CodeAgent` and manual usage --- ## ๐Ÿ“ฆ Installation ```bash pip install linkup-sdk smolagents ``` Youโ€™ll also need a [Linkup API key](https://linkup.so) to use the tool. You get $5 credits on signing up to try it out. --- ## ๐Ÿ”‘ Setup API Key You can provide the API key: - At runtime - Or by setting the environment variable: ```bash export LINKUP_API_KEY="your-linkup-api-key" ``` You **must** however pass the `linkup_api_key` as a parameter in the space plug-and-play. This ensures safe and personalized access to your Linkup account in public environments. --- ## ๐Ÿง  Usage with SmolAgents ```python from smolagents import load_tool tool = load_tool("Linkup-Platform/linkup-search-tool", trust_remote_code=True) tool.forward( query="What are the latest trends in generative AI?", depth="deep", ) ``` --- ## ๐ŸŽฏ When to Use `standard` vs `deep` | Mode | Best For | |------------|-----------------------------------------------| | `standard` | Quick factual lookups, direct answers | | `deep` | Complex topics, analysis, multiple perspectives, latest news | --- ## ๐Ÿ’ฌ Example Result (truncated) ```markdown **Search Results:** 1. **The State of Generative AI 2024** URL: https://venturebeat.com/generative-ai-2024 Generative AI is reshaping industries, with key players like OpenAI, Anthropic, and Google DeepMind... 2. **AI Trends: What's Coming Next?** URL: https://techcrunch.com/ai-trends-2024 This year weโ€™ll see more foundation model APIs, compliance tooling, and multi-modal agents... ``` --- For questions or API access, visit [linkup.so](https://linkup.so). Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference