Skip to main content

Get your API key

Create a Linkup account for free to get your API key.
No API key? You can also access the Linkup API using the x402 payment protocol: pay per request in USDC, no account needed.

Using cURL

Your API key needs to be sent with every request as a Bearer token in the Authorization header.
curl
curl "https://api.linkup.so/v1/search" \
    -G \
    -H "Authorization: Bearer <YOUR_LINKUP_API_KEY>" \
    ...

Using the Python SDK

Option 1: Set a LINKUP_API_KEY environment variable in your shell before using the SDK.
shell
export LINKUP_API_KEY='<YOUR_LINKUP_API_KEY>'
Option 2: Set the LINKUP_API_KEY environment variable directly within Python, using for instance os.environ or python-dotenv.
python
import os
from linkup import LinkupClient

os.environ["LINKUP_API_KEY"] = "<YOUR_LINKUP_API_KEY>"
# or dotenv.load_dotenv()
client = LinkupClient()
...
Option 3: Directly pass the Linkup API key to the Linkup Client.
python
from linkup import LinkupClient

client = LinkupClient(api_key="<YOUR_LINKUP_API_KEY>")
...

Using the JS SDK

Pass the Linkup API key to the Linkup Client.
js
import { LinkupClient } from 'linkup-sdk';

const client = new LinkupClient({
  apiKey: '<YOUR_LINKUP_API_KEY>',
});

Using the CLI

The CLI can store your API key locally with the interactive setup flow:
shell
linkup setup
For scripts and CI, set LINKUP_API_KEY in the environment. The environment variable takes precedence over the local config file at ~/.linkup/config.
shell
LINKUP_API_KEY='<YOUR_LINKUP_API_KEY>' linkup search "What is Microsoft's 2024 revenue?"
Need help? Email support@linkup.so, ping us on Discord, or talk to us.