SERM والمختصون وسيناريوهات API
SERM والمختصون وسيناريوهات API. طلبات HTTP والمعلمات ومخططات الاستجابة وخطوات العمل مع Labrika.
في هذه الصفحة
مرجع طرق API — SERM
اختر طريقة من الفهرس. تحقق من طريقة HTTP والمسار والصلاحيات والمعلمات الإلزامية وجسم الطلب. كتل JSON التي تحتوي على schema وproperties و$ref تصف العقد، ولا تُرسل باعتبارها جسم طلب جاهزًا. أمثلة الطلبات ومخططات الردود معنونة بشكل منفصل.
طرق هذا القسم
POST /public-api/v1/serm/sites/{site_uuid}/cost
اسأل عن عمق البحث (20 أو 50 أو 100 أو 200 نتيجة)، ثم اعرض سعر تحليل SERM لهذا العمق.
نماذج البيانات المرتبطة: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · AnalysisEstimate · ErrorResponse
الأذونات: serm:run
المعلمات
site_uuid (path)
{
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"example": "d3c9e51b06a44e27831f205ceac20000"
}
}
الطلب
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"depth"
],
"properties": {
"depth": {
"type": "integer",
"enum": [
20,
50,
100,
200
]
}
}
}
}
}
}
الاستجابات
200
اسأل عن عمق البحث (20 أو 50 أو 100 أو 200 نتيجة)، ثم اعرض سعر تحليل SERM لهذا العمق.
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AnalysisEstimate"
}
}
}
}
}
}
400
عند غياب المفتاح أو عدم صلاحيته، تصف ترويسات الحدود المحاولات الفاشلة لكل IP. بعد المصادقة تصف حدود المفتاح أو الحساب. قد تغيب عند الحظر المسبق أو تعذّر استخدام العدّاد. X-RateLimit-Reset طابع Unix بالثواني؛ وRetry-After عند 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"
}
}
}
}
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
ابدأ التحليل بالسعر المؤكد باستخدام التقدير وقيمة Idempotency-Key الخاصة به.
نماذج البيانات المرتبطة: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse
الأذونات: serm:run
المعلمات
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
}
}
الطلب
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"cost_estimate_id"
],
"properties": {
"cost_estimate_id": {
"type": "string"
}
}
}
}
}
}
الاستجابات
202
ابدأ التحليل بالسعر المؤكد باستخدام التقدير وقيمة 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
اعرض آخر تقرير SERM منشور أو اختر تقريرًا باستخدام report_id. تتضمن الاستجابة تاريخ التقرير ولغته وحالته والأقسام المتاحة لك.
نماذج البيانات المرتبطة: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse
الأذونات: serm:read
المعلمات
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}$"
}
}
الاستجابات
200
اعرض آخر تقرير SERM منشور أو اختر تقريرًا باستخدام report_id. تتضمن الاستجابة تاريخ التقرير ولغته وحالته والأقسام المتاحة لك.
{
"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"
}
}
}
}
مرجع طرق API — Specialists
اختر طريقة من الفهرس. تحقق من طريقة HTTP والمسار والصلاحيات والمعلمات الإلزامية وجسم الطلب. كتل JSON التي تحتوي على schema وproperties و$ref تصف العقد، ولا تُرسل باعتبارها جسم طلب جاهزًا. أمثلة الطلبات ومخططات الردود معنونة بشكل منفصل.
طرق هذا القسم
POST /public-api/v1/specialist-requests
أرسل طلب العثور على متخصص للمراجعة. استخدم البريد الإلكتروني الموثق والمحدد في قسم الخبراء واقبل قواعد العملاء الحالية.
نماذج البيانات المرتبطة: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse
الأذونات: specialist-requests:write
المعلمات
Idempotency-Key (header)
{
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9._:-]+$"
}
}
الطلب
{
"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
]
}
}
}
}
}
}
الاستجابات
201
أُرسل الطلب للمراجعة.
{
"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
عند غياب المفتاح أو عدم صلاحيته، تصف ترويسات الحدود المحاولات الفاشلة لكل IP. بعد المصادقة تصف حدود المفتاح أو الحساب. قد تغيب عند الحظر المسبق أو تعذّر استخدام العدّاد. X-RateLimit-Reset طابع Unix بالثواني؛ وRetry-After عند 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"
}
}
}
}
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"
}
}
}
}
سير العمل
اختر النتيجة المطلوبة واتبع الطلبات بالترتيب. يظهر نطاق الصلاحيات بجانب كل سيناريو.
اضبط LABRIKA_API_KEY. خذ SITE_UUID وENGINE_ID من قائمة المواقع وPROJECT_ID من قائمة المشاريع. اضبط COST_ESTIMATE_ID وIDEMPOTENCY_KEY باستخدام حقلي cost_estimate_id وidempotency_key في عرض السعر. خذ RUN_ID من استجابة التشغيل. اضبط LIST_REVISION باستخدام حقل list.revision في النتيجة. بعد تعديل القائمة وقبل تطبيقها، حدّث LIST_REVISION باستخدام حقل revision من استجابة PATCH.
إذا انتهت مهلة البدء، أعد إرسال Idempotency-Key ونص الطلب نفسيهما. عند 401 راجع المفتاح، وعند 403 الصلاحيات، وعند 409 سبب التعارض. عند 429 اتبع Retry-After إن وُجد.
أحدث ترتيب
اقرأ الترتيب المحفوظ للمنطقة ومحرك البحث المطلوبين.
serp:read
تتطلب قراءة ترتيب الكلمات المفتاحية اشتراكًا نشطًا في Business أو Agency. تتوفر قوائم المواقع وتواريخ القياس باستخدام 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"
}
]
}
]
}
بدء تدقيق كامل
احتفظ بمعرّف عرض السعر وتابع المرحلة باستخدام معرّف الموقع.
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
}
}
كلمات مفتاحية للموقع
اقرأ النتيجة وعدّل قائمة العمل وانقل النسخة المختارة إلى إعدادات الموقع.
domain-keywords:run
حدّد PAYMENT_OPTION من عرض السعر. استخدم ai_credits إذا كانت credits_available تساوي true، أو money_balance إذا كانت balance_available تساوي true. إذا كانت القيمتان false، فأضف رصيدًا قبل التشغيل. استخدم خيار الدفع نفسه عند إعادة المحاولة.
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
}
مطالبات للظهور في الذكاء الاصطناعي
اشرح ما تقدمه الشركة وما تستبعده. اختر من 30 إلى 2000 مطالبة بزيادة عشر مطالبات.
prompt-suggestions:run
حدّد PAYMENT_OPTION من عرض السعر. استخدم ai_credits إذا كانت credits_available تساوي true، أو money_balance إذا كانت balance_available تساوي true. إذا كانت القيمتان false، فأضف رصيدًا قبل التشغيل. استخدم خيار الدفع نفسه عند إعادة المحاولة.
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
}
الظهور في الذكاء الاصطناعي
ابحث عن مشاريع النطاق واختر استخدام مشروع حالي أو إنشاء مشروع آخر. ابدأ التقرير بالسعر المعتمد. استخدم Idempotency-Key من عرض السعر. عند التأكيد تحل الإعدادات الجديدة محل الإعدادات الحالية.
sites:createai-visibility:run
احسب السعر بالإعدادات المحفوظة أو الجديدة. احذف payment_option لعرض السعر بأرصدة الذكاء الاصطناعي وبعملة الحساب. يبدأ التقرير بعد التأكيد.
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
}
}
التغييرات في الموقع
اختر مشروع المراقبة واقرأ أحدث تنبيهاته.
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 قبول الطلب، وليس اكتمال العمل. احفظ المعرّف وتحقق من الحالة بطريقة GET المحددة. كما أن HTTP 200 عند قراءة الحالة لا يثبت نجاح المهمة: افحص status وحقول الخطأ. التزم بالفاصل retry_after_seconds عند إرجاعه.
ميزانية استخدام API/MCP المشتركة والرصيد المالي وحدود الاشتراك وأرصدة الذكاء الاصطناعي موارد منفصلة. قد يستهلك تقدير لا يخصم مالًا الميزانية التقنية. قبل العملية المدفوعة، راجع التقدير الحالي وطريقة الدفع وعملة الرد.
مقالات أخرى في هذا القسم
- Labrika API: البدء والمصادقة والأخطاء
- Labrika API: نماذج البيانات والبيانات الوصفية
- تدقيق SEO والتقارير والتصدير عبر API
- الكلمات المفتاحية والترتيب عبر API
- الظهور في الذكاء الاصطناعي واقتراحات المطالبات عبر API
- كاتب الذكاء الاصطناعي وأوصاف المنتجات عبر API
- مراقبة التغييرات Diff عبر API
- تنبيهات API وخطافات الويب والجداول
- خطط العمل والمهام ومجموعات المشاريع عبر API
