Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Ahrefs Ahrefs Site Metrics

API 文件
https://api.sandbase.ai/v1/api/ahrefs/metrics

Return core Site Explorer metrics for a target domain on a given date: organic and paid keyword counts, top-3 keyword count, organic traffic, and traffic value. 4xx/5xx are not charged.

價格
$0.08美元/次呼叫
方法
POST
回應
JSON
參數
2 個必填 · 0 個選填

Playground

輸入
Snapshot date in `YYYY-MM-DD` format.
Target domain, e.g. `ahrefs.com`.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Ahrefs Ahrefs Site Metrics API

Returns Site Explorer metrics for a target domain on a given date. The response covers organic and paid keyword counts, top-3 organic keywords, organic and paid traffic, and cost values. You send a target domain and a date in YYYY-MM-DD format.

Use cases

  • Compare the organic traffic of a competitor domain with your own on the same date.
  • Track how many keywords a site ranks for in positions 1 to 3 by calling the API for different dates.
  • Check whether a domain runs paid search by reading metrics.paid_keywords and metrics.paid_traffic.
  • Estimate the value of a site's organic traffic with metrics.org_cost when screening acquisition targets.

Request

curl -X POST "https://api.sandbase.ai/v1/api/ahrefs/metrics" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target": "ahrefs.com", "date": "2026-10-01"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
datestringYesSnapshot date in YYYY-MM-DD format.
targetstringYesTarget domain, e.g. ahrefs.com.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "metrics": {
    "org_cost": 423229931,
    "org_keywords": 36098,
    "org_keywords_1_3": 14678,
    "org_traffic": 2566697,
    "paid_cost": 45844,
    "paid_keywords": 34,
    "paid_pages": 10,
    "paid_traffic": 515
  }
}

Response fields

FieldMeaning
metrics.org_keywordsNumber of keywords the target ranks for in organic search.
metrics.org_keywords_1_3Number of organic keywords where the target ranks in positions 1 to 3.
metrics.org_trafficOrganic traffic estimate for the target.
metrics.org_costCost value of the organic traffic. The response does not show the currency unit.
metrics.paid_keywordsNumber of keywords the target bids on in paid search.
metrics.paid_pagesNumber of pages of the target that appear in paid search results.
metrics.paid_trafficPaid traffic estimate for the target.
metrics.paid_costCost value of the paid traffic. The response does not show the currency unit.

Notes

  • Both target and date are required. Pass the domain, for example ahrefs.com, and a date such as 2026-10-01.
  • Call the API with different date values to build a time series for one domain.
  • To see the authority score of the same domain, call Ahrefs Ahrefs Domain Rating.

Pricing

$0.08 per successful call. Failed calls are not charged.

探索更多

相關 APIs

所有 APIs
API價格回應
Ahrefs每次呼叫 $0.08JSON
Ahrefs每次呼叫 $0.013545 起非同步 JSON
Ahrefs每次呼叫 $0.08JSON
Ahrefs每次呼叫 $0.01419 起非同步 JSON
Ahrefs每次呼叫 $0.02709 起非同步 JSON
Ahrefs每次呼叫 $0.01419 起非同步 JSON

問題

常見問題

我要如何使用 Ahrefs Ahrefs Site Metrics API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/ahrefs/metrics。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Ahrefs Ahrefs Site Metrics API 的費用是多少?

每次 $0.08,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Ahrefs Ahrefs Site Metrics API 接受哪些參數?

必要:date (string) 和 target (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Ahrefs Ahrefs Site Metrics API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Ahrefs 開發者帳號或 API 金鑰嗎?

不需要。Ahrefs Ahrefs Site Metrics 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Ahrefs API 存取權。