API Documentation

Domain Rating History API

Preview available months or retrieve monthly Domain Rating history.

Test API

Endpoint

GET https://api.goanyapi.com/api/v1/dr-history

When ratings are returned, the current configured cost is 2 credits per returned month; month-only previews do not deduct credits, but the account balance must cover the full result.

Authentication

Authorization: Bearer YOUR_API_KEY

Request Parameters

ParameterTypeRequiredDescription
domainstringYesTarget domain, such as kviku.com
includeDrbooleanNoDefaults to false; set to true to return and charge for DR data

Additional query parameters are rejected. Boolean values must be exactly true or false.

Preview Available Months

Use preview mode to see the available months and the exact credits required for the full result. Preview mode deducts 0 credits.

GET /api/v1/dr-history?domain=kviku.com&includeDr=false
Authorization: Bearer YOUR_API_KEY
{
  "code": "ok",
  "message": "ok",
  "data": {
    "endpoint": "dr-history",
    "costCredits": 0,
    "query": {
      "domain": "kviku.com",
      "includeDr": false
    },
    "itemCount": 7,
    "history": [
      { "month": 202511 },
      { "month": 202512 },
      { "month": 202601 },
      { "month": 202602 },
      { "month": 202607 },
      { "month": 202608 },
      { "month": 202609 }
    ]
  }
}

The response also includes unitCostCredits, requiredCredits, and remainingCredits. requiredCredits is the exact amount needed to retrieve all ratings currently available for the domain.

Retrieve Domain Ratings

Set includeDr=true to retrieve each rating. The API calculates the exact required credits, checks the balance, deducts credits transactionally, and only then returns DR values.

GET /api/v1/dr-history?domain=kviku.com&includeDr=true
Authorization: Bearer YOUR_API_KEY
{
  "code": "ok",
  "message": "ok",
  "data": {
    "endpoint": "dr-history",
    "query": {
      "domain": "kviku.com",
      "includeDr": true
    },
    "itemCount": 7,
    "history": [
      { "month": 202511, "dr": 22 },
      { "month": 202512, "dr": 24 },
      { "month": 202601, "dr": 12 },
      { "month": 202602, "dr": 11 },
      { "month": 202607, "dr": 11 },
      { "month": 202608, "dr": 11 },
      { "month": 202609, "dr": 8 }
    ]
  }
}

The paid response also includes unitCostCredits, requiredCredits, costCredits, and remainingCredits.

Billing and Balance Protection

  • requiredCredits equals the current DR unit cost multiplied by the number of valid unique months
  • includeDr=false returns months and the exact requirement with costCredits=0
  • includeDr=true deducts requiredCredits and then returns ratings
  • An empty valid history costs 0 credits
  • If the balance is below requiredCredits, both modes return HTTP 402 with insufficient_credits and no months, counts, costs, or ratings

Response Fields

FieldDescription
data.endpointFixed value: dr-history
data.costCreditsCredits deducted by this request
data.remainingCreditsCredits remaining after this request
data.query.domainNormalized domain
data.query.includeDrResolved boolean request mode
data.itemCountNumber of valid unique months
data.unitCostCreditsCurrent DR credit cost per returned month
data.requiredCreditsExact credits required for the complete result
data.history[].monthMonth in YYYYMM numeric format
data.history[].drDomain Rating; present only when includeDr=true