> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychannel3.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lovable with API

Build a shopping app in Lovable.

## 1. Create your accounts

Create a free [Channel3 account](https://trychannel3.com/sign-up/developer), then copy your API key. Start a new project at [Lovable](https://lovable.dev).

## 2. Build the shopping flow

Give Lovable a prompt that defines the experience you want.

```text theme={null}
Build a mobile-first gift finder. Let shoppers enter an occasion, recipient,
and budget, then show product cards with an image, title, merchant, price,
and Buy button. Use placeholder data for now.
```

## 3. Connect Channel3

Ask Lovable to add a server-side search function. When prompted, add your key as a secret named `CHANNEL3_API_KEY`. Never place it in client-side code.

```text theme={null}
Add a backend function called channel3-search that takes { query, filters },
POSTs to https://api.trychannel3.com/v1/search with x-api-key set
to the CHANNEL3_API_KEY secret, and returns the JSON with CORS enabled. Wire
the results page to call it only when the shopper submits a search. For each
product, render every available offer, showing offer.price.price and a Buy
button that links to offer.url so shoppers can choose their retailer.
```

The backend function keeps your API key private, while each `offer.url` provides an attributed buy link.

## 4. Build it bigger

Add filtering, product details, and smarter recommendations as your app grows. For help wiring these backend features, install the [Channel3 API skill](/skills/channel3-api) in Cursor or Claude Code:

```bash theme={null}
npx skills add channel3-ai/skills --skill channel3-api
```

The skill runs in your terminal coding agent, not in the Lovable chat.

## 5. Publish and earn

Click **Publish** in Lovable and choose your URL. Buy links returned from authenticated Channel3 requests are attributed to your API key, so sales through partner brands can earn commissions.

Track available brands, websites, clicks, and earnings in your Channel3 dashboard.
