Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Similarweb Traffic & Engagement

เอกสาร API
https://api.sandbase.ai/v1/api/similarweb/traffic-engagement

Get a website's traffic and engagement metrics month by month: visits, page views, visit duration, bounce rate and more.

ราคา
เริ่มต้นที่ $0.075USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
4 จำเป็น · 5 ไม่บังคับ

Playground

อินพุต
domain
end_date
metrics
start_date
Worldwide data only; values are case-insensitive.
granularity
main_domain_only
mtd
web_source
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

Similarweb Traffic & Engagement API

Returns monthly traffic and engagement metrics for a website, such as visits, page views, visit duration and bounce rate. You send a domain, a start_date and end_date in YYYY-MM format, and the metrics you want.

Use cases

  • Track monthly visits for a news site over a date range.
  • Compare a competitor's traffic month by month against your own site.
  • Pull bounce rate and pages per visit to check how engaged a site's visitors are.
  • Build a traffic time series for a domain to feed a dashboard or report.

Request

curl -X POST "https://api.sandbase.ai/v1/api/similarweb/traffic-engagement" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"start_date": "2026-09", "end_date": "2026-09", "country": "ww", "domain": "cnn.com", "metrics": "visits", "granularity": "monthly"}'

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

Parameters

NameTypeRequiredDescription
domainstringYesdomain
end_datestringYesend_date
metricsstringYesmetrics
start_datestringYesstart_date
countrystringNoWorldwide data only; values are case-insensitive.
granularitystringNogranularity
main_domain_onlybooleanNomain_domain_only
mtdbooleanNomtd
web_sourcestringNoweb_source

Example response

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

{
  "data": [
    {
      "average_visit_duration": null,
      "bounce_rate": null,
      "date": "2026-09-01",
      "new_users": null,
      "page_views": null,
      "pages_per_visit": null,
      "returning_users": null,
      "unique_visitors": null,
      "visits": 188658557.46746868
    }
  ],
  "meta": {
    "last_updated": "2026-09-30",
    "request": {
      "country": "ww",
      "domain": "cnn.com",
      "end_date": "2026-09-30",
      "format": "json",
      "granularity": "monthly",
      "main_domain_only": true,
      "metrics": [
        "visits"
      ],
      "mtd": false,
      "start_date": "2026-09-01",
      "state": null,
      "web_source": "total",
      "week_start_day": "default"
    },
    "status": "success"
  }
}

Response fields

FieldMeaning
data[].dateFirst day of the month the row covers, for example 2026-09-01.
data[].visitsEstimated number of visits to the domain in that month. This is a decimal number, not a rounded count.
data[].page_views / data[].unique_visitorsPage view and unique visitor counts for the month. They are null unless you request those metrics.
data[].average_visit_duration / data[].bounce_rate / data[].pages_per_visitEngagement metrics for the month. They are null unless you request them in metrics.
data[].new_users / data[].returning_usersSplit of new and returning users for the month. They are null when not requested.
meta.last_updatedDate of the most recent data update, shown as YYYY-MM-DD.
meta.request.web_sourceTraffic source the data covers. The response shows total when you do not set web_source.
meta.request.metricsList of the metrics the call applied.
meta.statusShows success when the call worked.

Notes

  • A domain that Similarweb has no traffic data for (usually a small or new site) returns HTTP 404, and the call is not charged.
  • Metrics you do not request come back as null in each data[] row, so set metrics to the ones you need.
  • Send start_date and end_date as YYYY-MM. The response echoes them as full dates, such as 2026-09-01 and 2026-09-30.
  • Set web_source to desktop, mobile_web or total to pick the traffic source. country accepts only ww (worldwide) and granularity accepts only monthly.
  • For a ready-made trend view, see Similarweb Website Traffic Trend or Similarweb Website Traffic Snapshot.

Pricing

Billed at the actual cost of each call, about $0.075 for the request above. Failed calls are not charged.

Plan a monthly traffic request

Use Traffic & Engagement for a domain's month-by-month estimates. Start with a bare domain such as cnn.com, metrics set to visits, and explicit start_date and end_date in YYYY-MM format. Both dates and metrics are required. country accepts ww only and granularity accepts monthly only. main_domain_only defaults to true; choose its value explicitly when comparing domains. Check the current schema before adding other metrics or options. A past month is not a guarantee of available data.

Estimate the whole date range

Pricing checked on 2026-11-08: the list-price formula is $0.075 × metric count × month count, including both the start and end month. One visits metric for 2026-09 through 2026-09 estimates $0.075; 2026-04 through 2026-09 estimates $0.45. Two supported metrics over those six months estimate $0.90. These are formula estimates before any applicable discount, not billed test results. Inspect current pricing before execution; the base price alone is not the cost of every date range.

For a single-month overview instead, inspect Website Traffic Snapshot.

Connect your first request

Already have a SandBase API key? Keep it in your local SANDBASE_API_KEY environment variable, then open this page's API tab for the POST route and request body. Send the key as a Bearer token; never put it in a shared prompt or committed file. The Quickstart explains setup.

Already connected your agent to SandBase? Ask it to inspect this exact endpoint and show the domain, month range and estimated cost before running one request. Starting a new project? Give your agent the setup Skill, this page URL and your research question. The Markdown quickstart is also ready to hand to an agent.

Read the completed response from outputs[0].data. The reference response illustrates one result; inspect your own returned payload before writing a parser. Missing estimates are unknown, not zero. Follow the Similarweb Python and traffic-comparison guide for a bounded request.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
Similarwebเริ่มต้นที่ $0.075 ต่อครั้งJSON
Similarwebเริ่มต้นที่ $0.225 ต่อครั้งJSON
Similarwebเริ่มต้นที่ $0.375 ต่อครั้งJSON
Similarwebเริ่มต้นที่ $0.15 ต่อครั้งJSON
Similarwebเริ่มต้นที่ $0.525 ต่อครั้งJSON
Similarweb$0.60 ต่อการเรียกJSON

คู่มือ:Similarweb API: request examples and billingSimilarweb API pricing: data credits vs per-call prices

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Similarweb Traffic & Engagement API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/similarweb/traffic-engagement โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Similarweb Traffic & Engagement API ราคาเท่าไร?

เริ่มต้นที่ $0.075 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Similarweb Traffic & Engagement API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: domain (string), end_date (string), metrics (string) และ start_date (string). ตัวเลือก: country (หนึ่งใน ww), granularity (หนึ่งใน monthly), main_domain_only (boolean), mtd (boolean) และ web_source (หนึ่งใน desktop, mobile_web, total). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Similarweb Traffic & Engagement API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Similarweb ไหม?

ไม่จำเป็น Similarweb Traffic & Engagement ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Similarweb API แยกต่างหาก

$0.075 ครอบคลุมกี่เดือนก็ได้หรือไม่?

ไม่ เมื่อเช็กใน 2026-11-08 สูตรราคาตามรายการจะคูณ $0.075 กับจำนวนเมตริกและจำนวนเดือนแบบรวม หนึ่งเมตริกตลอดหกเดือนประเมินได้ $0.45 ก่อนส่วนลดที่อาจใช้ได้ นี่เป็นการประเมินจากสูตร ไม่ใช่ผลทดสอบที่ถูกเรียกเก็บเงินจริง; โปรดตรวจสอบราคาปัจจุบันอีกครั้งก่อนใช้งาน

คำขอ traffic แรกของฉันควรใช้พารามิเตอร์ใด?

ส่ง domain, start_date, end_date และ metrics ใช้โดเมนแบบไม่ใส่ส่วนอื่น เช่น cnn.com, วันที่รูปแบบ YYYY-MM และ metric visits เวอร์ชันนี้รองรับ country ww และ granularity monthly เท่านั้น ค่าเริ่มต้นของ main_domain_only คือ true ใช้แท็บ API เพื่อดูคำขอ POST ที่แน่นอน; อย่าคาดว่าทุกเดือนที่ผ่านมาจะมีค่าประมาณให้ใช้

เอเจนต์ของฉันสร้างอินทิเกรชันนี้ให้ฉันได้ไหม?

ให้มันใช้ SandBase setup Skill และ URL ของเอ็นด์พอยต์นี้ จากนั้นระบุโดเมน เดือน และ metric ของคุณ หากเชื่อมต่ออยู่แล้ว ให้สั่งให้มันตรวจสอบเอ็นด์พอยต์ก่อน เก็บคีย์ไว้ในตัวแปรสภาพแวดล้อมในเครื่องและตรวจสอบต้นทุนคำขอทั้งหมดก่อนรัน อ่านเฉพาะ outputs[0].data จากการตอบกลับที่เสร็จสมบูรณ์; ข้อมูลที่หายไปไม่ได้แปลว่า visits เป็นศูนย์