curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"audiences": [
{
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"name": "Newsletter subscribers",
"type": "customerList",
"size": { "lower": 12000, "upper": 12000 },
"status": { "ready": true, "code": null, "description": "READY" },
"created": "2026-11-20T09:12:00.000Z"
},
{
"id": "8c1e2f3a-0000-4000-8000-000000000102",
"name": "Like my subscribers",
"type": "lookalike",
"size": { "lower": 0, "upper": 0 },
"status": { "ready": false, "code": null, "description": "NOT_READY" },
"created": "2026-12-01T16:40:00.000Z"
}
],
"meta": { "pagination": { "hasMore": false } }
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "accountId is required."
}
{
"action": "ads",
"status": "error",
"code": 370,
"message": "Error getting audiences. Please try again.",
"details": "Snapchat's reason"
}
Snapchat Ads
オーディエンス
Snapchat 広告アカウントのオーディエンスセグメントを、種類、規模、ブーストでターゲットにできるかとともに一覧表示します。
GET
/
ads
/
snapchat
/
audiences
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"audiences": [
{
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"name": "Newsletter subscribers",
"type": "customerList",
"size": { "lower": 12000, "upper": 12000 },
"status": { "ready": true, "code": null, "description": "READY" },
"created": "2026-11-20T09:12:00.000Z"
},
{
"id": "8c1e2f3a-0000-4000-8000-000000000102",
"name": "Like my subscribers",
"type": "lookalike",
"size": { "lower": 0, "upper": 0 },
"status": { "ready": false, "code": null, "description": "NOT_READY" },
"created": "2026-12-01T16:40:00.000Z"
}
],
"meta": { "pagination": { "hasMore": false } }
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "accountId is required."
}
{
"action": "ads",
"status": "error",
"code": 370,
"message": "Error getting audiences. Please try again.",
"details": "Snapchat's reason"
}
Snapchat 広告アカウントのオーディエンスセグメントを一覧表示します: 顧客リスト、Snap Pixel が検出したウェブサイト訪問者、および類似オーディエンス (lookalike) です。Snap をブーストするときに、ID を
targeting.audiences または targeting.excludedAudiences で使用します。
- Ayrshare で作成したものだけでなく、Snapchat Ads Manager で作成したセグメントも一覧に含まれます。
- Snapchat がブーストでセグメントをターゲットにできると示すと、
status.readyがtrueになります。照合済みの人が少なすぎるセグメントは準備ができていません (TOO_FEW_USERS)。 sizeは Snapchat 独自の照合済み人数で、lowerとupperの両方として送られます。- 結果はキャッシュされません: セグメントの規模と準備状況は、蓄積中に変化します。
- Snapchat が独自のページサイズを設定するため、ここでは
limitは効果がありません。
ヘッダーパラメータ
クエリパラメータ
レスポンスに
meta.pagination.hasMore: true がある場合、その meta.pagination.next の値をここに送ると次のページを取得できます。その他のパラメータは変更せずに送ってください: 別のリクエストの next 値は code: 101 を返します。レスポンス
各オーディエンスには以下が含まれます:id: ブースト、人の追加、削除のときに使うセグメント ID。name: Ads Manager に表示される名前。type:customerList、website、lookalike、または Ayrshare が作成しない種類のセグメントの場合はother。size:{ lower, upper }(どちらも Snapchat の人数)、または Snapchat が人数を報告しない場合はnull。status:{ ready, code, description }。readyは、ブーストで今すぐセグメントをターゲットにできる場合にtrueです。codeは常にnullです。descriptionは Snapchat のステータスで、READY、NOT_READY、TOO_FEW_USERSのいずれかです。created: セグメントの作成日時 (ISO 8601)、またはnull。
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"audiences": [
{
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"name": "Newsletter subscribers",
"type": "customerList",
"size": { "lower": 12000, "upper": 12000 },
"status": { "ready": true, "code": null, "description": "READY" },
"created": "2026-11-20T09:12:00.000Z"
},
{
"id": "8c1e2f3a-0000-4000-8000-000000000102",
"name": "Like my subscribers",
"type": "lookalike",
"size": { "lower": 0, "upper": 0 },
"status": { "ready": false, "code": null, "description": "NOT_READY" },
"created": "2026-12-01T16:40:00.000Z"
}
],
"meta": { "pagination": { "hasMore": false } }
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "accountId is required."
}
{
"action": "ads",
"status": "error",
"code": 370,
"message": "Error getting audiences. Please try again.",
"details": "Snapchat's reason"
}