Skip to main content

Asynchronous mode

An API call that includes the mode=async key-value pair will be satisfied asynchronously:
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://unblocker.joinmassive.com/search'\
'?terms=prolonged+fasting'\
'&mode=async'
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://unblocker.joinmassive.com/ai'\
'?prompt=prolonged+fasting'\
'&mode=async'
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://unblocker.joinmassive.com/browser'\
'?url=https://pubmed.ncbi.nlm.nih.gov/?term=prolonged+fasting'\
'&mode=async'
In response, the API will provide a JSON job identifier:
{ "id": "078fd246-f0f7-44a0-aabb-cadd7b12454f" }
{ "id": "1851dab8-4619-409f-893f-47dd3a180bc3" }
{ "id": "21cb972e-0e0f-47bb-9ce9-65b99e9cee77" }
The job results, completion, or content or job status can be requested at any time thereafter by passing the identifier to https://‍/search/results, https://‍/ai/completions, or https://‍/browser/content:
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://unblocker.joinmassive.com/search/results'\
'?id=078fd246-f0f7-44a0-aabb-cadd7b12454f'
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://unblocker.joinmassive.com/ai/completions'\
'?id=1851dab8-4619-409f-893f-47dd3a180bc3'
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://unblocker.joinmassive.com/browser/content'\
'?id=21cb972e-0e0f-47bb-9ce9-65b99e9cee77'
The results, completion, or content, if ready, will be returned in the same format as synchronous results, a synchronous completion, or synchronous content; otherwise, a JSON status message will be returned. A retrieving status indicates that the search, conversation, or request is in progress:
{ "status": "retrieving" }
A failed status indicates that the search, conversation, or request was unsuccessful and the call should be retried:
{ "status": "failed" }
These are the scheduling request parameters:
KeyRequiredValue
modeThe synchronous or asynchronous mode of content retrieval, sync or async; sync is the default mode
idThe identifier provided by the search, AI, or browser endpoints of an asynchronous job to retrieve
These are the response parameters:
KeyValue
idThe identifier to retrieve an asynchronous job with
statusThe status of an asynchronous job, retrieving or failed