🔑 Get your Linkup API Key

Get your API key

Create a Linkup account for free to get your API key.

📦 Install dependencies

pip install llama-index llama-index-tools-linkup-research

🏃 Run your agent

from llama_index.core.agent import FunctionCallingAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.linkup_research.base import LinkupToolSpec

# Tool init
linkup_tool = LinkupToolSpec(
    api_key="<YOUR LINKUP API KEY>"
    depth="standard", # or "deep"
    output_type="searchResults", # or "sourcedAnswer" or "structured"
)

# Agent init
agent = FunctionCallingAgent.from_tools(
    linkup_tool.to_tool_list(),
    llm=OpenAI(
      api_key="<YOUR OPENAI API KEY>",
      model="gpt-4o-mini"
    ),
)

# Agent invocation
agent.chat("Can you tell me which women were awarded the Physics Nobel Prize")

Visit the Concept page for more information on the depth and output_type parameters.

Facing issues? Reach out to our engineering team at support@linkup.so