具
Exports API
3 endpointsUtilitiesGlobalsocial:read
Public data endpoints for Exports.
View as Markdown| POST | /exports/undefined | Read every page of a list endpoint, such as every comment of a post, in the background, for download as JSON or CSV. Name the platform, the endpoint and its parameters without cursor or limit. |
| GET | /exports/{jobId} | Get an export: its status and exportResult, with the items and pages read so far. |
| GET | /exports/{jobId} | Download the items of an export as a JSON array or as CSV. |
Read every page of a list endpoint, such as every comment of a post, in the background, for download as JSON or CSV. Name the platform, the endpoint and its parameters without cursor or limit.
POST
/v1/exportsscope social:read1 unit
No parameters.
Request body
exportExportRequest | null required | |
endpointstring required | |
maxItemsinteger (int32) | |
paramsmap | |
platformstring required | |
idempotencyKeystring | |
metadatamap |
Response data
117 fields
attempt | integer (int32) |
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
browserResult | BrowserResult | null |
durationMs | integer (int32) |
evaluateResults | string[] |
finalUrl | string |
httpStatus | integer (int32) |
clientRef | string |
createdAt | integer (int64) |
error | string |
export | ExportRequest | null |
endpoint | string |
maxItems | integer (int32) |
params | map |
platform | string |
exportResult | ExportResult | null |
complete | boolean |
items | integer (int64) |
pages | integer (int32) |
units | integer (int64) |
finishedAt | integer (int64) | null |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
flowResult | FlowResult | null |
steps | FlowStepResult[] |
attempts | integer (int32) |
error | string |
finishedAt | integer (int64) | null |
id | string |
output | any | null |
startedAt | integer (int64) |
status | string |
idempotencyKey | string | null |
jobId | string |
maxAttempts | integer (int32) |
metadata | map |
nextAttemptAt | integer (int64) |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
result | HttpResult | null |
bodyPreview | string |
latencyMs | integer (int32) |
statusCode | integer (int32) |
runAt | integer (int64) |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
scriptResult | ScriptResult | null |
durationMs | integer (int32) |
exitCode | integer (int32) |
stderr | string |
stdout | string |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
skillsResult | SkillsResult | null |
durationMs | integer (int32) |
steps | SkillStepResult[] |
attempts | integer (int32) |
code | string |
durationMs | integer (int64) |
error | string |
healed | SkillHeal[] |
result | object | null |
skill | string |
startedAt | integer (int64) |
status | string |
url | string |
startedAt | integer (int64) | null |
status | string |
ttl | integer (int64) |
type | string |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/exports" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "export": { "endpoint": "…", "maxItems": 0, "params": {}, "platform": "…" }, "idempotencyKey": "…", "metadata": {} }'
const res = await fetch("https://api.hoshime.com/v1/exports", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "export": { "endpoint": "…", "maxItems": 0, "params": {}, "platform": "…" }, "idempotencyKey": "…", "metadata": {} }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/exports", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "export": { "endpoint": "…", "maxItems": 0, "params": {}, "platform": "…" }, "idempotencyKey": "…", "metadata": {} }, ) body = res.json()
{ "attempt": 0, "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "browserResult": { "durationMs": 0, "evaluateResults": [ "…" ], "finalUrl": "https://…", "httpStatus": 0 }, "clientRef": "…", "createdAt": 0, "error": "…", "export": { "endpoint": "…", "maxItems": 0, "params": {}, "platform": "…" }, "exportResult": { "complete": false, "items": 0, "pages": 0, "units": 0 }, "finishedAt": 0, "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "flowResult": { "steps": [ { "attempts": 0, "error": "…", "finishedAt": null, "id": "abc123", "output": null, "startedAt": 0, "status": "…" } ] }, "idempotencyKey": "…", "jobId": "abc123", "maxAttempts": 0, "metadata": {}, "nextAttemptAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "result": { "bodyPreview": "…", "latencyMs": 0, "statusCode": 0 }, "runAt": 0, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "scriptResult": { "durationMs": 0, "exitCode": 0, "stderr": "…", "stdout": "…" }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "skillsResult": { "durationMs": 0, "steps": [ { "attempts": 0, "code": "…", "durationMs": 0, "error": "…", "healed": [], "result": null, "skill": "…", "startedAt": 0, "status": "…", "url": "https://…" } ] }, "startedAt": 0, "status": "…", "ttl": 0, "type": "…", "updatedAt": 0 }
{jobId}
GET
/v1/exports/{jobId}Get an export: its status and exportResult, with the items and pages read so far.
scope social:read1 unit
Parameters
jobIdstring · path required |
Response data
117 fields
attempt | integer (int32) |
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
browserResult | BrowserResult | null |
durationMs | integer (int32) |
evaluateResults | string[] |
finalUrl | string |
httpStatus | integer (int32) |
clientRef | string |
createdAt | integer (int64) |
error | string |
export | ExportRequest | null |
endpoint | string |
maxItems | integer (int32) |
params | map |
platform | string |
exportResult | ExportResult | null |
complete | boolean |
items | integer (int64) |
pages | integer (int32) |
units | integer (int64) |
finishedAt | integer (int64) | null |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
flowResult | FlowResult | null |
steps | FlowStepResult[] |
attempts | integer (int32) |
error | string |
finishedAt | integer (int64) | null |
id | string |
output | any | null |
startedAt | integer (int64) |
status | string |
idempotencyKey | string | null |
jobId | string |
maxAttempts | integer (int32) |
metadata | map |
nextAttemptAt | integer (int64) |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
result | HttpResult | null |
bodyPreview | string |
latencyMs | integer (int32) |
statusCode | integer (int32) |
runAt | integer (int64) |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
scriptResult | ScriptResult | null |
durationMs | integer (int32) |
exitCode | integer (int32) |
stderr | string |
stdout | string |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
skillsResult | SkillsResult | null |
durationMs | integer (int32) |
steps | SkillStepResult[] |
attempts | integer (int32) |
code | string |
durationMs | integer (int64) |
error | string |
healed | SkillHeal[] |
result | object | null |
skill | string |
startedAt | integer (int64) |
status | string |
url | string |
startedAt | integer (int64) | null |
status | string |
ttl | integer (int64) |
type | string |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/exports/{jobId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/exports/{jobId}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/exports/{jobId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "attempt": 0, "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "browserResult": { "durationMs": 0, "evaluateResults": [ "…" ], "finalUrl": "https://…", "httpStatus": 0 }, "clientRef": "…", "createdAt": 0, "error": "…", "export": { "endpoint": "…", "maxItems": 0, "params": {}, "platform": "…" }, "exportResult": { "complete": false, "items": 0, "pages": 0, "units": 0 }, "finishedAt": 0, "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "flowResult": { "steps": [ { "attempts": 0, "error": "…", "finishedAt": null, "id": "abc123", "output": null, "startedAt": 0, "status": "…" } ] }, "idempotencyKey": "…", "jobId": "abc123", "maxAttempts": 0, "metadata": {}, "nextAttemptAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "result": { "bodyPreview": "…", "latencyMs": 0, "statusCode": 0 }, "runAt": 0, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "scriptResult": { "durationMs": 0, "exitCode": 0, "stderr": "…", "stdout": "…" }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "skillsResult": { "durationMs": 0, "steps": [ { "attempts": 0, "code": "…", "durationMs": 0, "error": "…", "healed": [], "result": null, "skill": "…", "startedAt": 0, "status": "…", "url": "https://…" } ] }, "startedAt": 0, "status": "…", "ttl": 0, "type": "…", "updatedAt": 0 }
{jobId}
GET
/v1/exports/{jobId}/downloadDownload the items of an export as a JSON array or as CSV.
scope social:read1 unit
Parameters
jobIdstring · path required | |
formatstring | json (the default) or csv.jsoncsvdefault json |
curl "https://api.hoshime.com/v1/exports/{jobId}/download" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/exports/{jobId}/download", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/exports/{jobId}/download", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
null