Use PrizePicks data in Lovable.
One prompt gives your app collected lines with observation times, with the key stored as a secret. Steps follow Lovable's documentation as of 1 November 2026.
Set it up
- Create a free account and copy an API key from your workspace.
- Open your Lovable project and paste the prompt below into the project chat.
- When Lovable asks for
PRIZEPICKS_API_KEY, enter it in the Add secret form. Do not type it in the chat. - Open the preview and check the table shows a recent Lines as of time.
- Ask Lovable to show the logs for
prizepicks-boardif the table is empty. A 401 means the key is wrong, so save it again in the project's secrets.
Connect this app to the PrizePicks API.
Docs: https://prizepicksapi.com/llms.txt
Spec: https://prizepicksapi.com/openapi.json
Auth: Bearer token in the Authorization header.
Secret: ask me for the key with the Add secret form and save it as PRIZEPICKS_API_KEY. Do not ask me to paste it in chat. Never put it in a VITE_ variable, the frontend, the repo or a URL.
Create one backend function named prizepicks-board that:
1. Takes an optional league, default NBA.
2. Calls GET https://prizepicksapi.com/api/v1/projections?league={league}&limit=100&view=compact with Authorization: Bearer from the backend secret and X-User-Request describing the dashboard operation. Omit secrets and personal data; disclose once that summaries are retained for 35 days.
3. Starts with one page. If meta.next_cursor is not null, show that results are partial and offer Load more. Follow the cursor only on that explicit action, keeping filters fixed. Deduplicate by id.
4. On HTTP 429, show the actual quota or rate-limit code and keep any saved rows explicitly labeled with their original observation time. Do not retry monthly exhaustion. Use bounded backoff for transient server failures. Never declare an empty or failed response a successful populated integration.
5. Caches by exact request URL for 5 minutes, so repeated page views do not make upstream calls. Revalidate with its ETag; reuse the saved body on HTTP 304. Read X-Usage-Unit and the remaining allowance. Page size affects credit cost; a 100-row compact projection page costs 1 credit on new plans.
6. Returns { rows, observed_at, source_status, next_cursor, partial } from data and meta. Show source health and original times alongside the table.
The frontend calls only this function, never https://prizepicksapi.com directly.
Each row has: id, league, player, team, stat, period, line, tier (standard, goblin or demon), sides, opponent, starts_at, status, observed_at, opening_line, line_moves, player_id, fixture_id, trending_count (source-reported pick count when available), live_score (current player stat with source and receive times plus stale and connection flags).
Build a table of the rows with filters for league, stat and tier and a search on player. Show "Lines as of {observed_at}" above it, and a notice if source_status is not fresh. Add this footer: "Data from prizepicksapi.com. Not affiliated with PrizePicks. Information, not betting advice."
When you finish, tell me how to confirm the function works.limit=100&view=compact starts with a bounded page. Keep partial results visible and load more only when needed. Lovable does not copy manually added secrets when you remix a project, so enter the key again in the new one.
Let Lovable see the data while it builds
Optional. This gives the Lovable chat live lines to work from, and is separate from your published app.
- Open Connectors, select Add custom, then MCP server.
- Name it
PrizePicksand enter the server URL below. - Choose Bearer token or API key and enter your key.
- Select Add server.
https://prizepicksapi.com/api/mcpQuestions
Why a backend function instead of calling the API from the page?
Anything in the frontend reaches the browser, including a VITE_ variable, and anyone could copy your key. Lovable keeps secrets in the backend and hands them to edge functions at runtime.
What does this starter consume?
It starts with one 100-row compact projection page, costing one credit on new plans. More pages require an explicit Load more action. The five-minute cache reduces repeated upstream calls but adds display delay. Existing request contracts can differ; inspect your usage unit and allowance.
Can my published Lovable app use the MCP server?
No. Lovable says custom MCP servers give context in the project chat only. The published app calls the REST API through the function in the prompt.
A step no longer matches what you see? Tell us and we will fix this page.