# Linking to Lana

Add `?q=<question>` to lana.ai. The chat opens and the prompt runs automatically.

## Quick start

```
https://www.lana.ai/?q=What+is+SOL+trading+at%3F
```

Prompts are capped at 500 characters. HTML is stripped before display.

## Deep-link routes

Skip the prompt and land users on an entity page.

- **Transaction** — `/tx/<signature>` — Detail view for a Solana transaction signature.
- **Wallet** — `/address/<address>` — Holdings, activity, and balances for any wallet.
- **Token** — `/token/<mint>` — Market data, holders, and metadata for a token mint.
- **Program** — `/program/<programId>` — Program metadata and recent invocations.

> **Tip — When in doubt, use `/address`.** Lana classifies mints, programs, and wallets server-side. Send any Solana address to `/address/<address>` and you'll be redirected to the right route.

## Embedding

For external links, set `target="_blank"` and `rel="noopener noreferrer"` so users keep your app loaded in the original tab.

### HTML

```html
<a
  href="https://www.lana.ai/?q=Explain%20this%20transaction"
  target="_blank"
  rel="noopener noreferrer"
>
  Ask Lana
</a>
```

### Markdown

```md
[Ask Lana](https://www.lana.ai/?q=Explain%20this%20transaction)
```

### JavaScript

```js
const url = new URL("https://www.lana.ai/");
url.searchParams.set("q", "Show me top tokens by volume today");
window.open(url, "_blank", "noopener,noreferrer");
```

### React

```jsx
<a
  href={`https://www.lana.ai/?q=${encodeURIComponent(prompt)}`}
  target="_blank"
  rel="noopener noreferrer"
>
  Ask Lana
</a>
```

Spaces and reserved characters need URL-encoding. The browser's `URL` API handles it for you — see the JavaScript example.

## Feedback

Built something with Lana? Email lana-feedback@helius.xyz.
