Skip to main content
GET
/
credits
Get Credits
curl --request GET \
  --url https://api.groweasy.io/credits \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "credits": 5000,
    "plan": "pro",
    "resetDate": "2024-02-01T00:00:00Z"
  }
}

Example

curl -X GET "https://api.groweasy.io/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "credits": 5000,
    "plan": "pro",
    "resetDate": "2024-02-01T00:00:00Z"
  }
}

Check Credits Before Scraping

It’s good practice to check your credit balance before starting a large scrape:
async function startScrapeIfCreditsAvailable(filters, requiredCredits) {
  // Check credits first
  const creditsResponse = await fetch('https://api.groweasy.io/credits', {
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
  });
  const { data: { credits } } = await creditsResponse.json();

  if (credits < requiredCredits) {
    throw new Error(`Insufficient credits: ${credits} available, ${requiredCredits} required`);
  }

  // Start the scrape
  const scrapeResponse = await fetch('https://api.groweasy.io/start', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ filters }),
  });

  return scrapeResponse.json();
}

Authorizations

Authorization
string
header
required

API key authentication. Get your API key from the GrowEasy dashboard.

Response

Credits retrieved successfully

success
boolean
Example:

true

data
object