Skip to main content

Endpoint

GET /api/jobs/quota
Retrieves your current quota status for job captures. This endpoint helps you monitor your API usage and plan accordingly.

Authentication

Requires a valid Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_TOKEN

Request

This endpoint does not require any request body or query parameters. Simply make a GET request with your authentication token.

Response Fields

used
integer
The number of jobs you have captured this month.Example: 15
limit
integer
Your monthly job capture limit. A value of -1 indicates unlimited quota.Example: 50 or -1 (unlimited)
remaining
integer
The number of job captures remaining this month. Returns -1 for unlimited plans.Example: 35 or -1 (unlimited)
reset_date
string
The date when your quota will reset, in YYYY-MM-DD format.Example: "2024-02-01"

Example Request

curl -X GET https://api.vegaai.com/api/jobs/quota \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Example Response

{
  "used": 15,
  "limit": 50,
  "remaining": 35,
  "reset_date": "2024-02-01"
}

Understanding Quota Limits

Only newly created jobs count toward your monthly quota. If you attempt to create a job with a source URL that already exists in your tracker, it will not consume quota.Actions that count:
  • Creating a new job via API
  • Capturing a new job via browser extension
Actions that don’t count:
  • Updating an existing job
  • Creating a duplicate job (same source URL)
  • Viewing or analyzing existing jobs
Premium and enterprise plans have unlimited job capture quotas. For these plans:
  • limit will be -1
  • remaining will be -1
  • used will show your actual usage for tracking purposes
  • You can create as many jobs as needed
Your quota resets on the first day of each month, as indicated by the reset_date field. The reset happens at midnight UTC.After the reset:
  • used returns to 0
  • remaining returns to your full limit
  • Previous month’s data is archived
When your quota is exhausted (remaining reaches 0):
  • API requests to create new jobs will fail with a 403 error
  • Browser extension will display a quota exceeded message
  • You can still view, update, and analyze existing jobs
  • You can upgrade your plan for a higher quota

Usage Examples

Check Before Creating a Job

// Check quota before creating a job
const quotaResponse = await fetch('https://api.vegaai.com/api/jobs/quota', {
  headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});

const quota = await quotaResponse.json();

if (quota.remaining > 0 || quota.remaining === -1) {
  // Safe to create job
  const jobResponse = await fetch('https://api.vegaai.com/api/jobs', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(jobData)
  });
} else {
  console.log('Quota exceeded. Resets on:', quota.reset_date);
}

Monitor Quota Usage

import requests
from datetime import datetime

def check_quota_status():
    url = 'https://api.vegaai.com/api/jobs/quota'
    headers = {'Authorization': 'Bearer YOUR_API_TOKEN'}
    
    response = requests.get(url, headers=headers)
    quota = response.json()
    
    if quota['limit'] == -1:
        print(f"Unlimited plan - Used: {quota['used']} jobs")
    else:
        percentage = (quota['used'] / quota['limit']) * 100
        print(f"Quota usage: {quota['used']}/{quota['limit']} ({percentage:.1f}%)")
        print(f"Remaining: {quota['remaining']} jobs")
        print(f"Resets on: {quota['reset_date']}")
        
        if quota['remaining'] < 10:
            print("Warning: Low quota remaining!")

check_quota_status()

Source Code Reference

The implementation can be found in:

Create Job

Add jobs to your tracker

Jobs API Overview

Learn about the Jobs API
Best Practice: Check your quota status regularly, especially if you’re running automated job capture scripts or processing jobs in batches.

Build docs developers (and LLMs) love