Skip to content

The API uses the member subscription credits already available in AfterLib.

These requests do not charge usage credits:

  • GET /v1/whoami
  • GET /v1/account
  • GET /v1/credits
  • GET /v1/collections
  • GET /v1/websites/domains
  • GET /v1/websites/domains/{domainId}
  • GET /v1/websites/domains/{domainId}/pages
  • GET /v1/websites/links
  • GET /v1/websites/links/{linkId}
  • GET /v1/websites/links/{linkId}/pages
  • GET /v1/websites/links/{linkId}/ads
  • POST /v1/collections/{collectionId}/items

Website domain and website link collection operations are no-credit in this phase.

Requests that return ad or page records charge credits for the unique items returned:

  • POST /v1/ads/search
  • GET /v1/ads/{adId}
  • POST /v1/pages/search
  • GET /v1/pages/{pageId}
  • GET /v1/collections/{collectionId}/items when it returns ads or pages

If a request would exceed the available credits, the API returns an error response instead of partial data.

Terminal window
curl https://api.afterlib.com/v1/credits \
-H "Authorization: Bearer $AFTERLIB_API_KEY"

Response:

{
"planId": "pro",
"billingUserId": "00000000-0000-7001-8001-aa0000000001",
"periodStart": 1779254247,
"periodEnd": 1781932647,
"credits": 99968,
"creditsMax": 100000,
"usageLimit": {
"isLimitReached": false,
"limitType": "none",
"hourlyCredits": 0,
"hourlyLimit": 5000,
"dailyCredits": 32,
"dailyLimit": 18000
}
}

Credit-gated responses include headers that show the remaining credit state when available. Use GET /v1/credits for the most readable current status.

GET /v1/credits returns usageLimit as an object when the account has active hourly or daily usage-limit tracking. Free-access accounts can return usageLimit: null.