usernamestringobligatoire
The Snapchat username or profile URL to look up (e.g. fcbarcelona or https://www.snapchat.com/add/fcbarcelona).
https://api.sandbase.ai/v1/api/snapchat/profileFetch a Snapchat user's public profile by username: display name, bio, subscriber count, and recent public content.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
This API returns the public profile of a Snapchat account: display name, bio, category, subscriber count, and a list of public stories. It needs one input, username, which can be a handle or a Snapchat profile URL.
curl -X POST "https://api.sandbase.ai/v1/api/snapchat/profile" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "nasa"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | The Snapchat username or profile URL to look up (e.g. fcbarcelona or https://www.snapchat.com/add/fcbarcelona). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"items": [
{
"bio": "Explore the universe and discover our home planet with official NASA snaps.",
"category": "Government Org",
"displayName": "NASA",
"handle": "nasa",
"image": "https://cf-st.sc-cdn.net/aps/bolt/aHR0cHM6Ly9jZi1zdC5zYy1jZG4ubmV0L2QvUVg2VHZkaD…",
"stories": [
{
"id": "ddf02468-ae16-4fc6-b1bc-bde7e1e22218",
"storyTitle": "Moon Joy",
"thumbnailUrl": "https://cf-st.sc-cdn.net/d/wAUDrJs74QBAl504N3DhT.410?mo=GjUaFDIBBDoBfUIGCMWw5M4G…"
}
],
"subscribers": 751900,
"url": "https://www.snapchat.com/add/nasa",
"website": "https://www.nasa.gov"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
found | true when the profile was found. A lookup that finds nothing returns false. |
data.items[].displayName | The public name shown on the profile. |
data.items[].handle | The Snapchat username of the account. |
data.items[].bio | The profile bio text. |
data.items[].category | The category label on the profile, such as Government Org. |
data.items[].subscribers | The number of subscribers the profile has. |
data.items[].url / data.items[].website | url is the Snapchat profile link. website is the external site listed on the profile. |
data.items[].image | URL of the profile image. |
data.items[].stories[].id | A UUID that identifies the story. |
data.items[].stories[].storyTitle / data.items[].stories[].thumbnailUrl | The title of a public story and the URL of its thumbnail image. |
nasa, or the full profile URL, such as https://www.snapchat.com/add/nasa, in username.data.items[], which is a list. Read the first item for the requested account.found before reading data.items, since a missing profile still returns a successful response.Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/snapchat/profile" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "nasa"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
usernamestringobligatoireThe Snapchat username or profile URL to look up (e.g. fcbarcelona or https://www.snapchat.com/add/fcbarcelona).
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
Snapchat ProfileCette API Snapchat | À partir de $0.0011 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/snapchat/profile avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
À partir de $0.0011 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : username (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. Snapchat Profile fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Snapchat séparément.