Skip to Content
APIEndpointsGet scan status

Get scan status

Status of one scan started by Start a social scan. Poll this until status is completed, failed, or cancelled, then read the results from List social discussions.

GET /brands/{brand_id}/social/scans/{scan_id}

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
scan_iduuidrequiredFrom Start a social scan

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/social/scans/7c9e1f3a-4b2d-4e6f-8a1c-9d3e5b7f2a10' \ --header 'Authorization: Bearer <api-key>'

Response

{ "data": { "job_id": "7c9e1f3a-4b2d-4e6f-8a1c-9d3e5b7f2a10", "status": "completed", "current_step": "done", "channel": "reddit", "result_count": 10, "credit_cost": 20, "is_free_scan": false, "opportunities_processed": 34, "opportunities_classified": 10, "drafts_generated": 0, "error_message": null, "started_at": "2026-08-27T09:12:04.000Z", "completed_at": "2026-08-27T09:14:41.000Z", "created_at": "2026-08-27T09:12:00.000Z" }, "request_id": "req_4e8c1a3f7b2d46f0ba9c" }

Response fields

FieldTypeDescription
data.job_iduuidrequired
data.statusstringrequired. pending, running, completed, failed, or cancelled
data.current_stepstring | nullInternal pipeline step name, mainly useful for support
data.channelstring | nullreddit or linkedin
data.result_countinteger | nullThe count requested when the scan was started
data.credit_costinteger | null0 when the scan was free
data.is_free_scanboolean | null
data.opportunities_processedintegerrequired. Threads or posts examined so far
data.opportunities_classifiedintegerrequired. Of those, how many were kept as real opportunities
data.drafts_generatedintegerrequired. Always 0 for a scan started through this endpoint — drafting is a separate step
data.error_messagestring | nullSet when status is failed
data.started_attimestamptz | null
data.completed_attimestamptz | null
data.created_attimestamptzrequired
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
401invalid_tokenThe key is missing, malformed, or does not exist
401token_expiredThe key passed its expiry date
401token_revokedThe key was revoked
404not_foundThe brand does not exist, the scan does not exist, or this key is not allowed to reach either. All three are deliberately indistinguishable
429rate_limitedOver 300 requests per minute. See the Retry-After header

Notes

There is no list endpoint for past scans yet — only lookup by the job_id a start call returned. Keep it if you want to check back on it.

opportunities_processed and opportunities_classified update while the scan runs, not only at the end. A scan that never finds anything relevant can legitimately complete with both at 0.

Last updated on