프로필 통계 조회
curl --request GET \
--url https://sajuapi.dev/v1/reports/profiles \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/reports/profiles"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/reports/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/reports/profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/reports/profiles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sajuapi.dev/v1/reports/profiles")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/reports/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body리포트
프로필 통계 조회
GET
/
v1
/
reports
/
profiles
프로필 통계 조회
curl --request GET \
--url https://sajuapi.dev/v1/reports/profiles \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/reports/profiles"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/reports/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/reports/profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/reports/profiles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sajuapi.dev/v1/reports/profiles")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/reports/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyv1 Enterprise API (Coming Soon)이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다.
현재는 v0 API를 사용하세요.
Query 파라미터
string
조회 시작 날짜입니다. ISO 8601 형식(YYYY-MM-DD)입니다. 프로필 생성일 기준입니다.
string
조회 종료 날짜입니다. ISO 8601 형식(YYYY-MM-DD)입니다.
Response
성공
프로필 통계 조회에 성공하면 ProfileReport 객체가 반환됩니다.실패
| 상태 코드 | 에러 타입 | 설명 |
|---|---|---|
| 401 | authentication_error | API 키가 유효하지 않음 |
| 429 | rate_limited | 요청 한도 초과 |
요청 예시
curl -X GET "https://api.sajuapi.dev/v1/reports/profiles" \
-H "X-API-Key: bs_live_xxx"
const response = await fetch(
'https://api.sajuapi.dev/v1/reports/profiles',
{
headers: {
'X-API-Key': 'bs_live_xxx'
}
}
);
const report = await response.json();
import requests
response = requests.get(
'https://api.sajuapi.dev/v1/reports/profiles',
headers={'X-API-Key': 'bs_live_xxx'}
)
report = response.json()
응답 예시
{
"total_profiles": 5420,
"active_profiles": 5180,
"deleted_profiles": 240,
"gender_distribution": {
"male": {
"count": 2580,
"percentage": 47.6
},
"female": {
"count": 2840,
"percentage": 52.4
}
},
"day_master_distribution": {
"갑목": { "count": 520, "percentage": 9.6 },
"을목": { "count": 485, "percentage": 8.9 },
"병화": { "count": 612, "percentage": 11.3 },
"정화": { "count": 498, "percentage": 9.2 },
"무토": { "count": 545, "percentage": 10.1 },
"기토": { "count": 502, "percentage": 9.3 },
"경금": { "count": 578, "percentage": 10.7 },
"신금": { "count": 490, "percentage": 9.0 },
"임수": { "count": 598, "percentage": 11.0 },
"계수": { "count": 592, "percentage": 10.9 }
},
"element_distribution": {
"wood": { "count": 1005, "percentage": 18.5 },
"fire": { "count": 1110, "percentage": 20.5 },
"earth": { "count": 1047, "percentage": 19.3 },
"metal": { "count": 1068, "percentage": 19.7 },
"water": { "count": 1190, "percentage": 22.0 }
},
"weakest_element_distribution": {
"wood": { "count": 1150, "percentage": 21.2 },
"fire": { "count": 980, "percentage": 18.1 },
"earth": { "count": 1020, "percentage": 18.8 },
"metal": { "count": 1180, "percentage": 21.8 },
"water": { "count": 1090, "percentage": 20.1 }
},
"birth_year_distribution": {
"1950-1959": 120,
"1960-1969": 380,
"1970-1979": 720,
"1980-1989": 1450,
"1990-1999": 1820,
"2000-2009": 780,
"2010-2019": 150
},
"creation_trend": [
{
"date": "2025-01-10",
"new_profiles": 45,
"deleted_profiles": 3
},
{
"date": "2025-01-11",
"new_profiles": 52,
"deleted_profiles": 2
},
{
"date": "2025-01-12",
"new_profiles": 38,
"deleted_profiles": 5
}
]
}
ProfileReport 객체
| 필드 | 타입 | 설명 |
|---|---|---|
total_profiles | integer | 전체 프로필 수입니다. |
active_profiles | integer | 활성 프로필 수입니다. |
deleted_profiles | integer | 삭제된 프로필 수입니다. |
gender_distribution | object | 성별 분포입니다. |
day_master_distribution | object | 일주 분포입니다. |
element_distribution | object | 오행 분포입니다. |
weakest_element_distribution | object | 가장 약한 오행 분포입니다. |
birth_year_distribution | object | 출생 연도대별 분포입니다. |
creation_trend | array | 프로필 생성 추이입니다. |
활용 사례
마케팅 분석
일주와 오행 분포를 분석하여 사용자 그룹을 세분화하고, 맞춤형 콘텐츠를 제공할 수 있습니다.// 가장 많은 일주 확인
const report = await fetch('/v1/reports/profiles').then(r => r.json());
const topDayMaster = Object.entries(report.day_master_distribution)
.sort((a, b) => b[1].count - a[1].count)[0];
console.log(`가장 많은 일주: ${topDayMaster[0]} (${topDayMaster[1].percentage}%)`);
⌘I