SERM, spécialistes et scénarios API
SERM, spécialistes et scénarios API. Requêtes HTTP, paramètres, schémas de réponse et procédures Labrika.
Dans cet article
Référence des méthodes API — SERM
Choisissez une méthode dans le sommaire. Vérifiez la méthode HTTP, le chemin, les autorisations, les paramètres obligatoires et le corps. Les blocs JSON contenant schema, properties et $ref décrivent le contrat ; ne les envoyez pas comme corps de requête. Les exemples de requêtes et les schémas de réponse sont identifiés séparément.
Méthodes de cette section
POST /public-api/v1/serm/sites/{site_uuid}/cost
Demandez la profondeur de recherche (20, 50, 100 ou 200 résultats), puis indiquez le prix SERM correspondant.
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · AnalysisEstimate · ErrorResponse
Autorisations: serm:run
Paramètres
site_uuid (path)
{
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"example": "d3c9e51b06a44e27831f205ceac20000"
}
}
Requête
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"depth"
],
"properties": {
"depth": {
"type": "integer",
"enum": [
20,
50,
100,
200
]
}
}
}
}
}
}
Réponses
200
Demandez la profondeur de recherche (20, 50, 100 ou 200 résultats), puis indiquez le prix SERM correspondant.
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AnalysisEstimate"
}
}
}
}
}
}
400
Sans clé valide, les en-têtes de limite concernent les tentatives échouées par IP. Après authentification, ils concernent la clé ou le compte. Ils peuvent être absents en cas de blocage préalable ou de compteur indisponible. X-RateLimit-Reset est un horodatage Unix en secondes ; Retry-After pour 429 est un délai en secondes.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
401
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
403
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
404
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
409
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
422
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
429
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
POST /public-api/v1/serm/sites/{site_uuid}/run
Lancez l’analyse au prix confirmé avec le devis et sa clé Idempotency-Key.
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse
Autorisations: serm:run
Paramètres
site_uuid (path)
{
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"example": "d3c9e51b06a44e27831f205ceac20000"
}
}
Idempotency-Key (header)
{
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
Requête
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"cost_estimate_id"
],
"properties": {
"cost_estimate_id": {
"type": "string"
}
}
}
}
}
}
Réponses
202
Lancez l’analyse au prix confirmé avec le devis et sa clé Idempotency-Key.
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
}
400
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
401
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
403
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
404
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
409
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
422
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
429
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
GET /public-api/v1/serm/sites/{site_uuid}/report
Consultez le dernier rapport SERM publié ou sélectionnez une version par report_id. La réponse contient la date, la langue, le statut et les sections accessibles.
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse
Autorisations: serm:read
Paramètres
site_uuid (path)
{
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{32}$",
"example": "d3c9e51b06a44e27831f205ceac20000"
}
}
report_id (query)
{
"schema": {
"type": "string",
"pattern": "^[0-9a-v]{20}$"
}
}
Réponses
200
Consultez le dernier rapport SERM publié ou sélectionnez une version par report_id. La réponse contient la date, la langue, le statut et les sections accessibles.
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"site_uuid",
"report_id",
"created_at",
"language",
"status",
"sections"
],
"properties": {
"site_uuid": {
"type": "string"
},
"report_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"language": {
"type": "string"
},
"status": {
"type": "string"
},
"sections": {
"type": "array",
"items": {
"type": "object",
"required": [
"section",
"report_id",
"status",
"calculated_at",
"data"
],
"properties": {
"section": {
"type": "string"
},
"report_id": {
"type": "string"
},
"status": {
"type": "string"
},
"calculated_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"data": {
"type": "object",
"nullable": true,
"properties": {
"version": {
"type": "integer"
},
"total": {
"type": "integer"
},
"known": {
"type": "integer"
},
"unknown": {
"type": "integer"
},
"positive": {
"type": "integer"
},
"neutral": {
"type": "integer"
},
"negative": {
"type": "integer"
},
"average": {
"type": "number",
"nullable": true
},
"negative_share": {
"type": "number",
"nullable": true
},
"metrics": {
"type": "array",
"nullable": true,
"items": {
"type": "object"
}
},
"groups": {
"type": "array",
"nullable": true,
"items": {
"type": "object"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
400
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
401
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
403
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
404
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
409
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
422
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
429
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
Référence des méthodes API — Specialists
Choisissez une méthode dans le sommaire. Vérifiez la méthode HTTP, le chemin, les autorisations, les paramètres obligatoires et le corps. Les blocs JSON contenant schema, properties et $ref décrivent le contrat ; ne les envoyez pas comme corps de requête. Les exemples de requêtes et les schémas de réponse sont identifiés séparément.
Méthodes de cette section
POST /public-api/v1/specialist-requests
Soumettre à la modération une demande de recherche de spécialiste. Utilisez l’adresse de contact déjà vérifiée dans Spécialistes et acceptez les règles en vigueur pour les clients.
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse
Autorisations: specialist-requests:write
Paramètres
Idempotency-Key (header)
{
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9._:-]+$"
}
}
Requête
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"title",
"description",
"category",
"language",
"email",
"currency",
"budget_type",
"payment_methods",
"rules_version",
"accept_terms"
],
"oneOf": [
{
"properties": {
"budget_type": {
"enum": [
"fixed",
"approximate"
]
}
},
"required": [
"budget_minor"
]
},
{
"properties": {
"budget_type": {
"enum": [
"negotiable"
]
}
},
"not": {
"required": [
"budget_minor"
]
}
}
],
"properties": {
"title": {
"type": "string",
"minLength": 5,
"maxLength": 200
},
"description": {
"type": "string",
"minLength": 100,
"maxLength": 5000
},
"category": {
"type": "string",
"enum": [
"technical",
"seo",
"content",
"speed",
"analytics",
"reputation",
"directory_registration",
"crowd_links",
"text_optimization",
"contextual_ads",
"website_development",
"website_modernization",
"outreach"
],
"example": "seo"
},
"language": {
"type": "string",
"example": "en"
},
"email": {
"type": "string",
"format": "email"
},
"currency": {
"type": "string",
"example": "USD"
},
"budget_type": {
"type": "string",
"enum": [
"fixed",
"approximate",
"negotiable"
]
},
"budget_minor": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 10000000000
},
"payment_methods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"bank_transfer",
"card_transfer",
"sbp",
"yoomoney",
"card_payment",
"paypal",
"swift",
"bank_transfer_individual",
"bank_transfer_business"
]
}
},
"rules_version": {
"type": "integer",
"example": 2
},
"accept_terms": {
"type": "boolean",
"enum": [
true
]
}
}
}
}
}
}
Réponses
201
Demande soumise à la modération.
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending_moderation"
]
}
}
}
}
}
}
}
}
400
Sans clé valide, les en-têtes de limite concernent les tentatives échouées par IP. Après authentification, ils concernent la clé ou le compte. Ils peuvent être absents en cas de blocage préalable ou de compteur indisponible. X-RateLimit-Reset est un horodatage Unix en secondes ; Retry-After pour 429 est un délai en secondes.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
401
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
403
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
409
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
429
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
Scénarios
Choisissez le résultat recherché et suivez les requêtes dans l’ordre. Chaque scénario indique les autorisations nécessaires.
Définissez LABRIKA_API_KEY. Reprenez SITE_UUID et ENGINE_ID dans la liste des sites, et PROJECT_ID dans celle des projets. Renseignez COST_ESTIMATE_ID et IDEMPOTENCY_KEY avec les champs cost_estimate_id et idempotency_key du devis. Récupérez RUN_ID dans la réponse de lancement. Utilisez le champ list.revision du résultat pour LIST_REVISION. Après modification, actualisez LIST_REVISION avec le champ revision de la réponse PATCH avant de transférer la liste.
Après un dépassement de délai, reprenez le même Idempotency-Key et le même corps. Pour 401, vérifiez la clé, pour 403 les droits, pour 409 la raison du conflit. Pour 429, suivez Retry-After si présent.
Dernières positions
Consultez les positions enregistrées pour la région et le moteur voulus.
serp:read
La consultation des positions nécessite un abonnement Business ou Agency actif. La liste des sites et les dates des relevés sont accessibles avec serp:read.
GET
/serp/sites?limit=10curl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/serp/sites?limit=10" \ -H "Authorization: Bearer $LABRIKA_API_KEY"GET
/serp/sites/$SITE_UUID/search-engines/$ENGINE_ID/dates?limit=5curl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/serp/sites/$SITE_UUID/search-engines/$ENGINE_ID/dates?limit=5" \ -H "Authorization: Bearer $LABRIKA_API_KEY"GET
/serp/sites/$SITE_UUID/search-engines/$ENGINE_ID/positions?collected_at=last&limit=20curl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/serp/sites/$SITE_UUID/search-engines/$ENGINE_ID/positions?collected_at=last&limit=20" \ -H "Authorization: Bearer $LABRIKA_API_KEY"
{
"data": [
{
"site_uuid": "d3c9e51b06a44e27831f205ceac20000",
"host": "example.com",
"search_engines": [
{
"id": 42,
"engine_title": "Google"
}
]
}
]
}
Lancer un audit complet
Conservez l’identifiant du devis et consultez la phase avec l’UUID du site.
site-audits:runmain-reports:read
GET
/main-reports/sites?limit=10curl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/main-reports/sites?limit=10" \ -H "Authorization: Bearer $LABRIKA_API_KEY"POST
/site-audits/sites/$SITE_UUID/costcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/site-audits/sites/$SITE_UUID/cost" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ --data '{"pages_limit":500,"payment_option":"auto"}'POST
/site-audits/sites/$SITE_UUID/runcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/site-audits/sites/$SITE_UUID/run" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ --data-binary @- <<JSON {"cost_estimate_id":"${COST_ESTIMATE_ID:?}"} JSONGET
/site-audits/sites/$SITE_UUID/progresscurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/site-audits/sites/$SITE_UUID/progress" \ -H "Authorization: Bearer $LABRIKA_API_KEY"
{
"data": {
"cost_estimate_id": "ESTIMATE_FROM_COST",
"idempotency_key": "KEY_FROM_COST",
"page_credits": 500,
"amount_minor": 0
}
}
Mots-clés pour un site
Consultez le résultat, modifiez la liste et appliquez la révision choisie aux paramètres du site.
domain-keywords:run
D’après le devis, définissez PAYMENT_OPTION sur ai_credits si credits_available vaut true, ou sur money_balance si balance_available vaut true. Si les deux valent false, rechargez le solde avant de lancer la demande. En cas de nouvel essai, conservez le même mode de paiement.
POST
/domain-keywords/costcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/domain-keywords/cost" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ --data '{"domain":"example.com","keyword_count":80}'POST
/domain-keywords/runcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/domain-keywords/run" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ --data-binary @- <<JSON {"cost_estimate_id":"${COST_ESTIMATE_ID:?}","payment_option":"${PAYMENT_OPTION:?}"} JSONGET
/domain-keywords/runs/$RUN_ID/progresscurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/domain-keywords/runs/$RUN_ID/progress" \ -H "Authorization: Bearer $LABRIKA_API_KEY"GET
/domain-keywords/runs/$RUN_IDcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/domain-keywords/runs/$RUN_ID" \ -H "Authorization: Bearer $LABRIKA_API_KEY"PATCH
/domain-keywords/runs/$RUN_ID/listcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/domain-keywords/runs/$RUN_ID/list" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ -X PATCH \ --data-binary @- <<JSON {"revision":${LIST_REVISION:?},"mode":"append","items":[{"text":"wholesale tea"}]} JSONPOST
/domain-keywords/runs/$RUN_ID/applycurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/domain-keywords/runs/$RUN_ID/apply" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @- <<JSON {"site_uuid":"${SITE_UUID:?}","revision":${LIST_REVISION:?}} JSON
{
"cost_estimate_id": "ESTIMATE_FROM_COST",
"idempotency_key": "KEY_FROM_COST",
"ai_credits": 40,
"amount_minor": 20,
"currency": "USD",
"credits_available": true,
"balance_available": true,
"keyword_count": 80
}
Prompts pour la visibilité dans l’IA
Décrivez l’offre et les exclusions de l’entreprise. Choisissez 30 à 2 000 prompts par tranche de 10.
prompt-suggestions:run
D’après le devis, définissez PAYMENT_OPTION sur ai_credits si credits_available vaut true, ou sur money_balance si balance_available vaut true. Si les deux valent false, rechargez le solde avant de lancer la demande. En cas de nouvel essai, conservez le même mode de paiement.
POST
/prompt-suggestions/costcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/prompt-suggestions/cost" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ --data '{"domain":"example.com","company_description":"We supply wholesale loose-leaf tea and tasting packs to cafés and independent retailers. We help customers plan their range and deliver regularly under contract.","exclusions":["Coffee","Coffee equipment","Retail purchases"],"prompt_count":30}'POST
/prompt-suggestions/runcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/prompt-suggestions/run" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ --data-binary @- <<JSON {"cost_estimate_id":"${COST_ESTIMATE_ID:?}","payment_option":"${PAYMENT_OPTION:?}"} JSONGET
/prompt-suggestions/runs/$RUN_ID/progresscurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/prompt-suggestions/runs/$RUN_ID/progress" \ -H "Authorization: Bearer $LABRIKA_API_KEY"GET
/prompt-suggestions/runs/$RUN_IDcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/prompt-suggestions/runs/$RUN_ID" \ -H "Authorization: Bearer $LABRIKA_API_KEY"PATCH
/prompt-suggestions/runs/$RUN_ID/listcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/prompt-suggestions/runs/$RUN_ID/list" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ -X PATCH \ --data-binary @- <<JSON {"revision":${LIST_REVISION:?},"mode":"append","items":[{"text":"Where can cafés buy wholesale tea?"}]} JSONPOST
/prompt-suggestions/runs/$RUN_ID/applycurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/prompt-suggestions/runs/$RUN_ID/apply" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @- <<JSON {"site_uuid":"${SITE_UUID:?}","revision":${LIST_REVISION:?}} JSON
{
"cost_estimate_id": "ESTIMATE_FROM_COST",
"idempotency_key": "KEY_FROM_COST",
"ai_credits": 21,
"amount_minor": 11,
"currency": "USD",
"credits_available": true,
"balance_available": true
}
Visibilité dans les IA
Recherchez les projets correspondant au domaine pour choisir un projet existant ou en créer un autre. Lancez le rapport au prix confirmé. Utilisez la clé Idempotency-Key du devis. Les nouveaux paramètres remplacent les anciens à la confirmation.
sites:createai-visibility:run
Calculez le prix avec les paramètres enregistrés ou proposés. Omettez payment_option pour afficher le prix en crédits IA et dans la devise du compte. Le rapport démarre après confirmation.
GET
/sites/by-domain?domain=example.comcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/sites/by-domain?domain=example.com" \ -H "Authorization: Bearer $LABRIKA_API_KEY"GET
/ai-visibility/sites/$SITE_UUID/modelscurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/ai-visibility/sites/$SITE_UUID/models" \ -H "Authorization: Bearer $LABRIKA_API_KEY"POST
/ai-visibility/sites/$SITE_UUID/costcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/ai-visibility/sites/$SITE_UUID/cost" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ --data '{"settings":{"domain":"example.com","brand":"Acme","aliases":["Acme Studio"],"prompts":["Where can cafés order tea wholesale?"],"models":["chatgpt"],"competitors":[{"domain":"competitor.example","brand":"Rival Tea"}]}}'POST
/ai-visibility/sites/$SITE_UUID/runcurl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/ai-visibility/sites/$SITE_UUID/run" \ -H "Authorization: Bearer $LABRIKA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ --data-binary @- <<JSON {"cost_estimate_id":"${COST_ESTIMATE_ID:?}"} JSON
{
"data": {
"cost_estimate_id": "ESTIMATE_FROM_COST",
"idempotency_key": "KEY_FROM_COST",
"ai_credits": 1,
"money_equivalent_minor": 1,
"can_start": true
}
}
Changements sur le site
Trouvez le projet de surveillance et consultez ses alertes récentes.
diff-projects:readdiff-alerts:read
GET
/diff-projects?limit=10curl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/diff-projects?limit=10" \ -H "Authorization: Bearer $LABRIKA_API_KEY"GET
/diff-projects/$PROJECT_ID/alerts?limit=20curl --silent --show-error --fail-with-body "https://app.labrika.com/public-api/v1/diff-projects/$PROJECT_ID/alerts?limit=20" \ -H "Authorization: Bearer $LABRIKA_API_KEY"
HTTP 202 confirme l’acceptation, pas la fin du traitement. Conservez l’identifiant et consultez l’état avec le GET indiqué. HTTP 200 lors de cette lecture ne prouve pas la réussite de la tâche : vérifiez status et les erreurs. Respectez retry_after_seconds lorsqu’il est fourni.
Le budget commun API/MCP, le solde monétaire, les quotas d’abonnement et les crédits IA sont distincts. Une estimation sans débit monétaire peut consommer le budget technique. Avant une opération payante, vérifiez l’estimation actuelle, le mode de paiement et la devise de la réponse.
Autres articles de cette rubrique
- API Labrika : démarrage, authentification et erreurs
- API Labrika : modèles de données et métadonnées
- Audits SEO, rapports et exports via API
- Mots-clés et positions via API
- Visibilité dans les IA et suggestions de prompts via API
- Rédacteur IA et descriptions de produits via API
- Suivi des modifications Diff via API
- Alertes, webhooks et planification API
- Plans de travail, tâches et groupes de projets API
