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

# Quickstart

> Get started with the Mr. Doge API in under 5 minutes

## Get Your First Odds in 5 Minutes

This guide will walk you through creating an account, getting your API key, purchasing credits, and making your first API request.

<Steps>
  <Step title="Create Your Account">
    Sign up for a free account at [mrdoge.co](https://mrdoge.co)

    1. Visit [mrdoge.co/register](https://mrdoge.co/register)
    2. Enter your email and create a password or sign up with Google
    3. You're in instantly — no email verification required. **Every new account gets 500 free credits** to start testing the API immediately.

    <Check>
      **500 free credits included!** No credit card required. Start making API calls right away.
    </Check>
  </Step>

  <Step title="Purchase Credits">
    Your 500 free credits are great for testing, but when you're ready for production, purchase more credits from your dashboard.

    <Info>
      **Why Credits?** We use a pay-as-you-go model. Buy credits once, use them whenever you need. No monthly subscriptions or hidden fees.
    </Info>

    **Available Packages:**

    * **STARTER**: 20,000 credits - \$29.90
    * **GROWTH**: 100,000 credits - \$59.90
    * **BUSINESS**: 500,000 credits - \$199.90
    * **ENTERPRISE**: 2,000,000 credits - \$599.90

    Most endpoints cost only 1 credit per request, so your free 500 credits = 500 API calls!

    <Card title="View Full Pricing" icon="tag" href="/credits/pricing">
      See detailed credit costs for each endpoint
    </Card>
  </Step>

  <Step title="Generate Your API Key">
    Create your first API key in the dashboard:

    1. Go to **Dashboard → API Keys**
    2. Click **Create API Key**
    3. Enter a name (e.g., "Production App")
    4. Click **Create**

    <Warning>
      Store your API key securely. It provides access to your credits and data. Never commit it to version control or share it publicly.
    </Warning>
  </Step>

  <Step title="Make Your First Request">
    Let's fetch today's soccer matches with odds and AI recommendations!

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X GET "https://api.mrdoge.co/v2/matches?sport=soccer&status=upcoming&status=live&locale=en" \
        -H "Authorization: Bearer sk_live_your_api_key_here"
      ```

      ```javascript JavaScript/Node.js theme={null}
      const fetch = require('node-fetch');

      async function getEvents() {
        const response = await fetch(
          'https://api.mrdoge.co/v2/matches?sport=soccer&status=upcoming&status=live&locale=en',
          {
            headers: {
              'Authorization': 'Bearer sk_live_your_api_key_here'
            }
          }
        );

        const data = await response.json();

        // Check credit usage
        console.log('Credits Remaining:', response.headers.get('X-Credits-Remaining'));
        console.log('Credits Consumed:', response.headers.get('X-Credits-Consumed'));

        console.log(`Found ${data.count} upcoming soccer matches`);
        return data;
      }

      getEvents();
      ```

      ```python Python theme={null}
      import requests

      def get_events():
          url = 'https://api.mrdoge.co/v2/matches'
          headers = {'Authorization': 'Bearer sk_live_your_api_key_here'}
          params = {'sport': 'soccer', 'status': ['upcoming', 'live'], 'locale': 'en'}

          response = requests.get(url, headers=headers, params=params)

          # Check credit usage
          print(f"Credits Remaining: {response.headers.get('X-Credits-Remaining')}")
          print(f"Credits Consumed: {response.headers.get('X-Credits-Consumed')}")

          events = response.json()
          print(f"Found {events.get('count', len(events.get('data', [])))} upcoming soccer matches")
          return events

      get_events()
      ```

      ```php PHP theme={null}
      <?php
      $apiKey = 'sk_live_your_api_key_here';
      $url = 'https://api.mrdoge.co/v2/matches?sport=soccer&status=upcoming&status=live&locale=en';

      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, [
          'Authorization: Bearer ' . $apiKey
      ]);

      $response = curl_exec($ch);
      $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

      // Get credit headers
      $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
      $headers = substr($response, 0, $headerSize);

      curl_close($ch);

      $events = json_decode($response, true);
      echo "Found " . count($events['data'] ?? []) . " upcoming soccer matches\n";
      ?>
      ```
    </CodeGroup>

    <Check>
      **Success!** You've made your first API request. The response includes:

      * Event details (teams, start time, competition)
      * Markets and betting odds
      * AI recommendations with edge percentage
      * Your remaining credit balance in response headers
    </Check>
  </Step>

  <Step title="Monitor Your Usage">
    Track your API usage and credit consumption in real-time:

    1. Go to **Dashboard → API Keys**
    2. Click on your API key to view detailed analytics
    3. See request volumes, credits used, and response times
    4. View endpoint breakdown to optimize your usage

    <Tip>
      Enable **Auto-Recharge** to automatically top up your credits when they run low. Never miss an API call!
    </Tip>
  </Step>
</Steps>

## Understanding the Response

Here's what you get back from the `/v2/matches` endpoint:

```json theme={null}
{
  "data": [
    {
      "id": "match_123456",
      "slug": "arsenal-vs-chelsea-2025-11-05",
      "homeTeam": {
        "id": "team_456",
        "name": "Arsenal",
        "logo": "https://api.mrdoge.co/images/teams/95450.png"
      },
      "awayTeam": {
        "id": "team_789",
        "name": "Chelsea",
        "logo": "https://api.mrdoge.co/images/teams/197280.png"
      },
      "startTime": "2025-11-05T20:00:00Z",
      "competition": {
        "id": "comp_123",
        "name": "Premier League",
        "logo": "https://api.mrdoge.co/images/regions/6.png"
      },
      "region": {
        "id": "region_01",
        "name": "England",
        "code": "GB"
      },
      "status": "scheduled",
      "markets": [
        {
          "id": "mkt_001",
          "name": "Match Winner",
          "type": "1X2",
          "betItems": [
            {
              "id": "bet_001",
              "outcome": "Arsenal",
              "odds": 2.1,
              "impliedProbability": 0.476
            },
            {
              "id": "bet_002",
              "outcome": "Draw",
              "odds": 3.4,
              "impliedProbability": 0.294
            },
            {
              "id": "bet_003",
              "outcome": "Chelsea",
              "odds": 3.8,
              "impliedProbability": 0.263
            }
          ]
        }
      ],
      "bettingRecommendations": [
        {
          "id": "rec_xyz",
          "market": "Match Winner",
          "outcome": "Arsenal",
          "recommendedOdds": 2.1,
          "confidence": "High",
          "edgePercentage": 7.2,
          "kellyFraction": 0.034,
          "rationale": "Strong home form with 8 wins in last 10 matches. Chelsea dealing with key injuries in defense.",
          "createdAt": "2025-11-05T10:30:00Z"
        }
      ]
    }
  ],
  "count": 1
}
```

## What's Next?

Now that you've made your first API call, explore these powerful features:

<CardGroup cols={2}>
  <Card title="Explore All Endpoints" icon="map" href="/api-reference/sports/events">
    Browse our complete API reference with 10+ endpoints for odds, live data, and AI predictions
  </Card>

  {" "}

  <Card title="Live Data & Scores" icon="bolt" href="/guides/live-data">
    Learn how to fetch real-time scores and live betting markets
  </Card>

  {" "}

  <Card title="Filtering & Queries" icon="filter" href="/guides/filtering">
    Master advanced filtering by region, competition, date range, and more
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/guides/error-handling">
    Learn best practices for handling errors and rate limits
  </Card>
</CardGroup>

## Common First-Time Issues

<AccordionGroup>
  <Accordion title="401 Unauthorized Error" icon="lock">
    **Problem**: You're getting a 401 error when making requests.

    **Solutions**:

    * Verify your API key is correct and starts with `sk_live_`
    * Ensure you're using Bearer authentication: `Authorization: Bearer sk_live_...`
    * Check that your API key hasn't been deactivated in the dashboard
    * Make sure you have sufficient credits
  </Accordion>

  <Accordion title="402 Payment Required Error" icon="credit-card">
    **Problem**: Getting a 402 error even though you purchased credits.

    **Solutions**:

    * Check your credit balance in the dashboard
    * Verify the payment was successful (check your email)
    * Wait 1-2 minutes for credits to reflect (usually instant)
    * Contact support if credits don't appear after 5 minutes
  </Accordion>

  <Accordion title="Empty Results Array" icon="list">
    **Problem**: API returns `[]` with no events.

    **Solutions**:

    * Try removing the `sport` filter to see all sports
    * Check if you're filtering by a future date with no scheduled events
    * Add `status=completed` if you need settled events
    * Some sports may not have events during off-season
  </Accordion>

  <Accordion title="Slow Response Times" icon="clock">
    **Problem**: API requests are taking too long.

    **Solutions**:

    * Use pagination with the `limit` parameter (default: 100)
    * Filter by specific `competitionId` or `regionId` instead of fetching all
    * Cache `/v2/matches` responses (or your prerender output) for static pages
    * Check your internet connection
  </Accordion>
</AccordionGroup>

## Need Help?

<CardGroup cols={2}>
  <Card title="Join Reddit Community" icon="reddit" href="https://www.reddit.com/r/mrdoge">
    Get help from other developers and the Mr. Doge team
  </Card>

  {" "}

  <Card title="Email Support" icon="envelope" href="mailto:support@mrdoge.co">
    Contact our technical support team directly
  </Card>

  {" "}

  <Card title="View Full Documentation" icon="book" href="/">
    Browse all guides and API references
  </Card>
</CardGroup>

<Note>
  **Pro Tip**: Use your 500 free credits to test and prototype. When you're
  ready for production, the STARTER package (20,000 credits for \$29.90) is
  perfect for small to medium apps. Credits never expire!
</Note>
