Vibe Coding
Describe what you want to build. Give the AI the right Sportmicro context. Keep it on real endpoints and real response shapes.
This page gives you a practical Sportmicro workflow for AI coding tools such as Cursor, Claude, ChatGPT, Gemini, Copilot, and similar editors or agents.
Give your AI the right context
For Sportmicro integrations, the AI needs three things up front:
- The docs map
- The API conventions
- The exact endpoint family for the sport you are using
Start with one of these.
llms.txt for broad orientation
Sportmicro publishes a curated machine-readable entry point at:
https://docs.sportmicro.com/llms.txt
Paste that URL into your AI tool and ask it to fetch the content first. This gives it the high-signal map of the docs, AI files, endpoint inventories, and OpenAPI specs.
If you want a broader catalog, use:
https://docs.sportmicro.com/llms-full.txt
Context blocks for faster starts
If you do not want the AI to fetch URLs first, paste one of these directly into the session:
The minimal block is enough for one-off tasks. The full block is better when the build touches filters, pagination, several endpoints, or more than one sport.
Cursor Rules for persistent project context
If you are building inside Cursor, make the Sportmicro knowledge persistent across the project:
MCP for tool use
If you want your client to call a curated Sportmicro tool layer instead of only reading docs and generating code, use the local MCP server:
What the AI should know about Sportmicro
Before you ask for code, make sure the AI understands these constraints:
- Each sport has its own base URL, such as
https://football.sportmicro.comorhttps://tennis.sportmicro.com - REST auth uses
Authorization: Bearer {API-KEY} - Realtime endpoints use
?token={API-KEY} - Filters use PostgREST-style syntax like
id=eq.142andstart_time=gte.2026-06-11 - Pagination is usually
offsetandlimit, with50as the common default and max - Many endpoints return top-level arrays, not
{ "data": ... } - Endpoint coverage varies by sport, so the AI should verify the route against docs or OpenAPI before generating code
Prompt patterns
These prompts are designed to produce code against the real Sportmicro APIs, not mock data.
Use them as starting points, then iterate in plain English.
1. Multi-sport live scoreboard
I'm building a live scoreboard with the Sportmicro API.
Use football for the first version.
Base URL: https://football.sportmicro.com
Auth: Authorization: Bearer token from SPORTMICRO_API_KEY
Build a live scoreboard page:
- Fetch live matches from GET /matches-live
- Render one card per match
- Show home team, away team, current score, status_type, start_time, and league_name
- Poll every 10 seconds
- Show an empty state when no live matches are returned
Important Sportmicro rules:
- The API may return a top-level JSON array
- Do not assume a data wrapper
- Keep the HTTP layer separate from the UI
Use React and Tailwind CSS.
Before writing UI code, fetch a real sample response from /matches-live and print the raw JSON so we can confirm the shape.
2. League explorer with teams and standings
I'm building a league explorer with the Sportmicro API.
Use football.
Base URL: https://football.sportmicro.com
Auth: Authorization: Bearer token from SPORTMICRO_API_KEY
Build a page that accepts a league_id and shows:
1. Teams from GET /teams-by-league?league_id=eq.{league_id}&lang=en
2. Standings from GET /standings?league_id=eq.{league_id}&season_id=eq.{season_id}
Requirements:
- First load the teams response and inspect the returned teams array
- If season_id is missing from the UI, add a second input for it instead of guessing
- Render team logos, names, and a standings table
- Handle empty arrays cleanly
Use Next.js and TypeScript.
Start by printing the raw JSON from both endpoints before building components.
3. Team and squad browser
I'm building a team browser with the Sportmicro API.
Use football.
Base URL: https://football.sportmicro.com
Auth: Authorization: Bearer token from SPORTMICRO_API_KEY
Build a workflow like this:
1. Enter a league_id
2. Fetch GET /teams-by-league?league_id=eq.{league_id}
3. Let the user select a team
4. Fetch GET /players-by-team?team_id=eq.{team_id}&lang=en
5. Group players by position code (G, D, M, F)
UI requirements:
- Show team crest, team name, and a grouped squad list
- Show player name, short_name, shirt number if present, and country_name
- Handle missing fields without crashing
Use React.
Before building the UI, fetch a real teams-by-league response and then a real players-by-team response and print both raw payloads.
4. Tennis schedule by date window
I'm building a tennis schedule app with the Sportmicro API.
Base URL: https://tennis.sportmicro.com
Auth: Authorization: Bearer token from SPORTMICRO_API_KEY
Build a daily schedule page:
- Accept a date
- Query GET /matches?start_time=gte.{date}&start_time=lt.{next_day}&lang=en
- Display tournament_name, round.name, home_team_name, away_team_name, start_time, status_type, and score if available
- Add filters for live, upcoming, and finished matches using status_type
Important:
- Use the exact Sportmicro filter syntax
- Treat the response as a top-level array unless the real payload proves otherwise
- Normalize missing nested fields defensively
Use Next.js with server components where helpful.
Start by printing the raw JSON for one real date before writing any UI.
5. Realtime match alerts
I'm building a realtime match alert service with the Sportmicro API.
Use football.
REST base URL: https://football.sportmicro.com
WebSocket URL pattern: wss://football.sportmicro.com/live/score?token={API_KEY}
Auth:
- REST uses Authorization: Bearer token from SPORTMICRO_API_KEY
- WebSocket token comes from the same env var
Build a Node.js service that:
- Bootstraps current live matches from GET /matches-live
- Connects to the live score WebSocket
- Logs score changes for tracked matches
- Falls back to polling /matches-live every 30 seconds if the socket disconnects
- Uses exponential backoff for reconnects
Single file is fine for the first version.
Before coding the socket handler, show the connection setup code and the REST bootstrap code separately.
6. Endpoint-aware code generation
I'm building against the Sportmicro API and I do not want guessed endpoints.
First load these resources:
- https://docs.sportmicro.com/llms.txt
- https://docs.sportmicro.com/ai/sportmicro-endpoint-summary.txt
- https://docs.sportmicro.com/openapi/football.json
Then help me build a football app feature.
Rules:
- Only use endpoints that exist in the provided docs or OpenAPI schema
- Follow Sportmicro auth, filter, and pagination conventions
- Assume list responses may be top-level arrays
- If a required endpoint is missing, say so explicitly instead of inventing one
Start by summarizing the exact football endpoints relevant to live match tracking, standings, teams, and players.
Tips
- Fetch real data first. Ask the AI to print the raw payload before it writes UI or business logic.
- Keep the sport explicit. Say
football,tennis,basketball, or the exact sport domain in the prompt. - Use IDs, not names, in final queries. Let the AI use lookup endpoints first when needed.
- Tell the AI not to invent wrappers. Sportmicro often returns arrays directly.
- Use the endpoint inventories when the scope gets large:
- Use sport-specific OpenAPI files when you want stronger type generation or schema validation.