Get a Snapchat ad's details
curl --request POST \
--url https://api.stophy.dev/v1/snapchat/ads/ad \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ad": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ad: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.stophy.dev/v1/snapchat/ads/ad', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/snapchat/ads/ad"
payload = { "ad": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"ad": {
"targeting": {
"hasRegulatedContent": true,
"ageRanges": [
"<string>"
]
},
"id": "<string>",
"name": "<string>",
"paidBy": "<string>",
"brand": "<string>",
"profile": "<string>",
"account": "<string>",
"status": "<string>",
"type": "<string>",
"creativeType": "<string>",
"headline": "<string>",
"cta": {
"text": "<string>",
"type": "<string>"
},
"languages": [
"<string>"
],
"media": {
"type": "<string>",
"url": "<string>"
},
"link": {
"url": "<string>",
"title": "<string>",
"description": "<string>",
"caption": "<string>"
},
"firstShownAt": "2023-11-07T05:31:56Z",
"lastShownAt": "2023-11-07T05:31:56Z",
"impressions": 0,
"countries": [
{
"impressions": 0,
"country": "<string>"
}
]
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Snapchat
Snapchat ad API
Call the Snapchat ad API to get name, paid by, brand, profile, account and status, as JSON or markdown. 1 credit.
POST
/
v1
/
snapchat
/
ads
/
ad
Get a Snapchat ad's details
curl --request POST \
--url https://api.stophy.dev/v1/snapchat/ads/ad \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ad": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ad: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.stophy.dev/v1/snapchat/ads/ad', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/snapchat/ads/ad"
payload = { "ad": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"ad": {
"targeting": {
"hasRegulatedContent": true,
"ageRanges": [
"<string>"
]
},
"id": "<string>",
"name": "<string>",
"paidBy": "<string>",
"brand": "<string>",
"profile": "<string>",
"account": "<string>",
"status": "<string>",
"type": "<string>",
"creativeType": "<string>",
"headline": "<string>",
"cta": {
"text": "<string>",
"type": "<string>"
},
"languages": [
"<string>"
],
"media": {
"type": "<string>",
"url": "<string>"
},
"link": {
"url": "<string>",
"title": "<string>",
"description": "<string>",
"caption": "<string>"
},
"firstShownAt": "2023-11-07T05:31:56Z",
"lastShownAt": "2023-11-07T05:31:56Z",
"impressions": 0,
"countries": [
{
"impressions": 0,
"country": "<string>"
}
]
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
snapchat.ads.ad - Returns:
datahasad. - Cost: 1 credit. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.snapchat.ads.ad({ ad: "550e8400-e29b-41d4-a716-446655440000" });
console.log(result.data.ad);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.snapchat.ads.ad(ad="550e8400-e29b-41d4-a716-446655440000")
print(result["data"]["ad"])
curl -X POST https://api.stophy.dev/v1/snapchat/ads/ad \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"ad":"550e8400-e29b-41d4-a716-446655440000"}'
stophy snapchat ads ad 550e8400-e29b-41d4-a716-446655440000
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$