domainstringbắt buộc
Bare website hostname without scheme, path, port, or credentials.
https://api.sandbase.ai/v1/api/similarweb/website-traffic-snapshotGet a one-month snapshot of a website's traffic: visits, visit duration, pages per visit and bounce rate.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns a one-month traffic snapshot for a website: visits, average visit duration, pages per visit and bounce rate. It needs a bare hostname in domain, such as cnn.com. You can pass a complete month in month.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/website-traffic-snapshot" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "cnn.com"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Bare website hostname without scheme, path, port, or credentials. |
country | string | No | Worldwide data only; values are case-insensitive. |
month | string | No | Complete month in YYYY-MM. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"domain": "cnn.com",
"metrics": {
"average_visit_duration": 197.57361621705832,
"bounce_rate": 0.6352565984600038,
"pages_per_visit": 1.9900475193331115,
"visits": 188658557.46746868
},
"month": "2026-09"
},
"meta": {
"country": "ww",
"end_date": "2026-09",
"granularity": "monthly",
"request_id": "imc_fefb0e65533d7032dd730ff1f2aa41eb6bb6f3bef45533349755e5e34fd75281",
"retrieved_at": "2026-11-03T07:43:23.674777096Z",
"source": "similarweb",
"start_date": "2026-09"
}
}
| Field | Meaning |
|---|---|
data.domain | The hostname the metrics describe. |
data.month | The month the snapshot covers, in YYYY-MM format. |
data.metrics.visits | Estimated number of visits to the site in that month. The value is a decimal, so round it for display. |
data.metrics.average_visit_duration | Average length of a visit. The value is not labeled with a unit, so check it against a known site before you display it. |
data.metrics.pages_per_visit | Average number of pages viewed in one visit. |
data.metrics.bounce_rate | Share of visits that left after one page, as a fraction between 0 and 1. A value of 0.635 means about 63.5%. |
meta.country | The country scope of the data. Only ww (worldwide) is supported. |
meta.start_date / meta.end_date | The first and last month covered. They match data.month for a snapshot. |
meta.granularity | How the data is bucketed. This API returns monthly. |
month, the response still returns a month in data.month. Set month to a complete month in YYYY-MM format to choose one yourself.country accepts only ww, and the value is case-insensitive.$0.3 per successful call. Failed calls are not charged.
Use Website Traffic Snapshot for one domain's monthly overview. domain is required: send a hostname such as cnn.com without a scheme, path, port or credentials. country accepts ww only. Set the optional month to a complete YYYY-MM when you need a reproducible comparison; check the returned month instead of assuming it is the current month. Availability for a particular domain or month is not guaranteed.
Pricing checked on 2026-11-08: the listed base price is $0.30 per call before any applicable discount. Recheck current pricing before execution. This price check was not a paid business query. For a month-by-month series with selected metrics, inspect Traffic & Engagement and its date-range pricing.
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.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/website-traffic-snapshot" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "cnn.com",
"country": "ww"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
domainstringbắt buộcBare website hostname without scheme, path, port, or credentials.
countrystringWorldwide data only; values are case-insensitive.
Mặc định: "ww"
Giá trị có thể dùng: ww
monthstringComplete month in YYYY-MM.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Similarweb | $0.30 mỗi lần gọi | JSON |
Similarweb | Từ $0.225 mỗi lần gọi | JSON |
Similarweb | Từ $0.375 mỗi lần gọi | JSON |
Similarweb | Từ $0.15 mỗi lần gọi | JSON |
Similarweb | Từ $0.525 mỗi lần gọi | JSON |
Similarweb | $0.60 mỗi lần gọi | JSON |
Hướng dẫn:Similarweb API: request examples and billingSimilarweb API pricing: data credits vs per-call prices
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/similarweb/website-traffic-snapshot với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.30 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: domain (string). Tùy chọn: country (một trong số ww) và month (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Similarweb Website Traffic Snapshot chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Similarweb.
Dùng Website Traffic Snapshot cho một domain và một tháng. Dùng Traffic & Engagement cho một khoảng ngày và các metric đã chọn; giá của nó phụ thuộc vào số lượng metric và số tháng. Giá trị Similarweb là ước tính, không phải quyền truy cập vào dữ liệu phân tích first-party của một trang web khác.
domain là bắt buộc và phải là hostname không có scheme, path, port hoặc thông tin xác thực. month là tùy chọn; cung cấp YYYY-MM đầy đủ khi bạn cần một tháng cụ thể và kiểm tra tháng trong kết quả. country chỉ chấp nhận ww. Dữ liệu thiếu không có nghĩa là traffic bằng 0.
Hãy kiểm tra đúng endpoint này, chọn một domain và một month, và xem giá hiện tại. Vào 2026-11-08, giá cơ bản niêm yết là $0.30 mỗi lần gọi trước mọi khoản giảm giá áp dụng. Đây là kiểm tra giá, không phải test đã thanh toán. Dùng Skill thiết lập cho một tích hợp mới và không để API key trong các prompt dùng chung.