アカウント情報
curl --request GET \
--url https://api.example.com/v1/accountimport requests
url = "https://api.example.com/v1/account"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account', 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://api.example.com/v1/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/v1/account"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/account")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"user_id": "<string>",
"username": "<string>",
"total_spent": 123,
"currency": "<string>"
}Account & Billing
アカウント情報
現資格のアカウントと累計データ支出。
GET
/
v1
/
account
アカウント情報
curl --request GET \
--url https://api.example.com/v1/accountimport requests
url = "https://api.example.com/v1/account"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account', 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://api.example.com/v1/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/v1/account"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/account")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"user_id": "<string>",
"username": "<string>",
"total_spent": 123,
"currency": "<string>"
}GET https://api-datahub.octoparse.com/v1/account
認証:APIキー必須(Authorization: Bearer <API Key>)。
現在の資格情報の背後にあるアカウントの識別情報と累計データ支出。時間軸なし。期間・次元別は 請求集計.
total_spent はデータ料金のみ — App 料金表に基づき実行出力へ請求された額。ウォレット残高、チャージ、請求書は Data Hub API 外。Octoparse アカウントセンターで確認。同一アカウントの API キーは同じ累計を見る。
リクエスト
リクエスト例
curl -H "Authorization: Bearer $OCTOPARSE_API_KEY" "https://api-datahub.octoparse.com/v1/account"
レスポンス
200 成功
{
"data": {
"user_id": "user-carol",
"username": "carol",
"total_spent": 0.06,
"currency": "USD"
}
}
data に包まれます。フィールド:
string
必須
安定アカウント id。
string
現在のユーザー名。公開 App の第 1 セグメント
<username>/<app_name> にもなる。未設定は null。number
必須
累計データ支出。
string
通貨。
エラー
| HTTP | code | category | Description |
|---|---|---|---|
| 401 | unauthorized | forbidden | API キー欠落または無効。 |
{"error": {code, category, message, retryable}} です。エラー を参照。
クライアントライブラリ
info = client.account()
print(info["username"], info["total_spent"], info["currency"])
const info = await client.account();
console.log(info.username, info.total_spent, info.currency);