Billing

List current user's billing period ledgers

Returns recent local billing period ledgers for the authenticated user. Period ledgers are local reconciliation records built from billing events and are not charged credits.

get/billing/me/periods

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/billing/me/periods
  • Auth: API key in header x-api-key

Query parameters

limitinteger

Maximum periods to return. Defaults to 12 and clamps to 24.

Headers

x-api-keystring required

API key required unless an authenticated JWT is already present

Response

Billing period ledgers

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": [
    {
      "charged_requests": 1150,
      "closed_at": "2026-05-01T00:15:00Z",
      "credits_used": 3450,
      "currency": "usd",
      "endpoint_breakdown": [
        {
          "charged_requests": 1150,
          "credits": 3450,
          "endpoint": "google/search",
          "failed_requests": 5,
          "non_billable_requests": 45,
          "requests": 1200
        }
      ],
      "expected_subscription_amount_cents": 7900,
      "expected_total_amount_cents": 7900,
      "failed_requests": 5,
      "generated_at": "2026-04-16T10:00:00Z",
      "included_credits": 400000,
      "non_billable_requests": 45,
      "overage_price_per_1000": 0.3,
      "period_end": "2026-05-01T00:00:00Z",
      "period_key": "2026-04",
      "period_start": "2026-04-01T00:00:00Z",
      "plan": "Pro",
      "pricing_source": "plan_default",
      "status": "open",
      "stripe_actual_amount_due_cents": 11100,
      "stripe_actual_amount_paid_cents": 11100,
      "stripe_actual_net_cash_cents": 11100,
      "stripe_actual_overage_cents": 3200,
      "stripe_actual_subscription_cents": 7900,
      "stripe_actual_total_cents": 11100,
      "stripe_customer_id": "cus_123",
      "stripe_invoice_amount_due": 19900,
      "stripe_invoice_amount_paid": 19900,
      "stripe_invoice_currency": "usd",
      "stripe_invoice_due_date": "2026-05-08T00:00:00Z",
      "stripe_invoice_effective_due_date": "2026-05-08T00:00:00Z",
      "stripe_invoice_finalized_at": "2026-05-01T01:00:00Z",
      "stripe_invoice_hosted_url": "https://invoice.stripe.com/i/acct_...",
      "stripe_invoice_id": "in_123",
      "stripe_invoice_last_event_created": "2026-05-01T01:01:00Z",
      "stripe_invoice_last_event_id": "evt_123",
      "stripe_invoice_number": "C8F8C2D-0001",
      "stripe_invoice_paid_at": "2026-05-01T01:01:00Z",
      "stripe_invoice_payment_failed_at": "2026-05-01T01:01:00Z",
      "stripe_invoice_pdf": "https://pay.stripe.com/invoice/.../pdf",
      "stripe_invoice_period_end": "2026-05-01T00:00:00Z",
      "stripe_invoice_period_start": "2026-04-01T00:00:00Z",
      "stripe_invoice_reconciliation_status": "paid",
      "stripe_invoice_status": "paid",
      "stripe_meter_event_identifier": "crawlora:user-1:2026-04:overage:v1",
      "stripe_meter_event_name": "crawlora_overage_credits",
      "stripe_snapshot_updated_at": "2026-05-01T01:01:00Z",
      "stripe_sync_attempts": 1,
      "stripe_sync_first_attempt_at": "2026-05-01T00:30:00Z",
      "stripe_sync_last_attempt_at": "2026-05-01T00:30:00Z",
      "stripe_sync_status": "synced",
      "stripe_synced_at": "2026-05-01T00:30:01Z",
      "subscription_price_cents": 7900,
      "updated_at": "2026-04-16T10:00:00Z",
      "user_id": "user-1"
    }
  ],
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.