PerfectParser Docs

Get Credits

Reference for the GET /v1/credits endpoint.

GET /v1/credits

Returns the current credit balance and a summary of active credit purchases. Use this to verify you have enough credits before submitting large extraction jobs.

curl https://api.perfectparser.com/v1/credits \
  -H "X-API-Key: pp_live_your_secret_key"

Response 200 OK

{
  "credits": {
    "available": 847,
    "purchases": [
      {
        "purchase_id": "pur_xyz",
        "plan": "popular",
        "credits": 1000,
        "remaining": 847,
        "expires_at": "2027-06-01T00:00:00.000Z",
        "purchased_at": "2026-06-01T12:00:00.000Z"
      }
    ]
  }
}

Response Properties

FieldTypeDescription
credits.availableintegerTotal non-expired credits available for use.
credits.purchasesarrayUp to 10 active purchases, most recently created first.
credits.purchases[].purchase_idstringUnique purchase identifier.
credits.purchases[].planstringPlan slug (e.g. starter, popular).
credits.purchases[].creditsintegerOriginal credit amount purchased.
credits.purchases[].remainingintegerCredits still available from this purchase.
credits.purchases[].expires_atstring | nullExpiry date, or null if non-expiring.
credits.purchases[].purchased_atstringPurchase timestamp (ISO 8601).


Common Error Responses

HTTP StatusError CodeDescription
401UNAUTHORIZEDInvalid or missing API key.

On this page