age_bucketstringจำเป็น
Select one age bucket; age_bucket must be provided exactly once.
ค่าที่เป็นไปได้: 18, 25, 35, 45, 55, 65
https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregatedGet the traffic share of one visitor age group on a website for the selected period.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Get the traffic share of one visitor age group on a website for the selected period.
The response is the official Similarweb API response, unchanged.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregated" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "cnn.com", "start_date": "2026-09", "end_date": "2026-09", "granularity": "monthly", "metrics": "share", "age_bucket": "25"}'
| Name | Type | Required | Description |
|---|---|---|---|
age_bucket | string | Yes | Select one age bucket; age_bucket must be provided exactly once. |
country | string | No | Worldwide data only; values are case-insensitive. |
domain | string | Yes | domain |
end_date | string | Yes | end_date |
format | string | No | format |
granularity | string | Yes | granularity |
main_domain_only | boolean | No | main_domain_only |
metrics | string | Yes | Comma-separated metrics. Supported: share. |
start_date | string | Yes | start_date |
web_source | string | No | web_source |
$0.45 per metric per month between start_date and end_date. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregated" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "cnn.com",
"country": "ww",
"metrics": "share",
"end_date": "2026-09",
"age_bucket": "25",
"start_date": "2026-09",
"granularity": "monthly"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
age_bucketstringจำเป็นSelect one age bucket; age_bucket must be provided exactly once.
ค่าที่เป็นไปได้: 18, 25, 35, 45, 55, 65
domainstringจำเป็นdomain
end_datestringจำเป็นend_date
granularitystringจำเป็นgranularity
ค่าที่เป็นไปได้: monthly
metricsstringจำเป็นComma-separated metrics. Supported: share.
start_datestringจำเป็นstart_date
countrystringWorldwide data only; values are case-insensitive.
ค่าเริ่มต้น: "ww"
ค่าที่เป็นไปได้: ww
formatstringformat
ค่าที่เป็นไปได้: json
main_domain_onlybooleanmain_domain_only
web_sourcestringweb_source
ค่าที่เป็นไปได้: total
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Similarweb | เริ่มต้นที่ $0.45 ต่อครั้ง | 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
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregated โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
เริ่มต้นที่ $0.45 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: age_bucket (หนึ่งใน 18, 25, 35, 45, 55, 65), domain (string), end_date (string), granularity (หนึ่งใน monthly), metrics (string) และ start_date (string). ตัวเลือก: country (หนึ่งใน ww), format (หนึ่งใน json), main_domain_only (boolean) และ web_source (หนึ่งใน total). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส)
ไม่จำเป็น Similarweb Demographics - Specific Groups ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Similarweb API แยกต่างหาก