Samplings
Events associés : sampling.completed · sampling.failed
L’objet Sampling
Attributs
idstringIdentifiant unique de l'objet (préfixé, opaque).
objectstringsamplingmarketstringCode du marché (pays ISO, par ex.
FR).triggerenumWhat started a sampling.
onboardingis the first sampling of a brand, launched when the owner closes the stepper (day 0).targetedre-runs a single query from the query drawer — it always carries aprompt_id.Valeurs possibles :
onboarding·scheduled·manual·targetedstatusenumValeurs possibles :
queued·running·completed·failedquerystringnullableweek_starts_onstringmodelsarray of objectqueries_countintegerruns_totalintegerruns_completedintegerruns_failedintegerbrand_shareobjectShare (%) of the answers citing the brand — null until the sampling is finalized.
by_modelarray of objectAfficher les attributs enfants
modelstringrunsintegerhitsintegeravg_positionnumbernullable
errorstringnullablestarted_atstringnullablefinished_atstringnullablelivemodebooleantruepour les données réelles,falsepour le bac à sable du mode test.createdintegerTime at which the object was created (unix timestamp, seconds).
{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}Retrieve a sampling
GET/v1/brands/{brand}/samplings/{sampling}
Paramètres
brandstringobligatoireBrand id (
br_…).samplingstringobligatoireSampling id (
smp_…).
Retour
Renvoie l’objet sampling. Lève une erreur en cas de problème.
curl
curl https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings/smp_034EPf7p3si7LL82NkYBhb \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}List samplings
GET/v1/brands/{brand}/samplings
The measurements of the brand, newest first: the weekly samplings of each market and the targeted re-samplings of a single query.
Paramètres
brandstringobligatoireBrand id (
br_…).marketstringstatusstringlimitintegerNombre d'objets à renvoyer, entre 1 et 100 (20 par défaut).
starting_afterstringCurseur : l'
iddu dernier objet de la page précédente.
Retour
Un dictionnaire dont la propriété data contient jusqu’à limit objets sampling, du plus récent au plus ancien, et has_more indique s’il reste une page. Lève une erreur en cas de problème.
curl
curl https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings?limit=3 \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"object": "list",
"url": "/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings",
"has_more": false,
"data": [
{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}
]
}