Browser API
Scrape any URL as markdown, text, HTML, links and metadata, crawl whole sites on a schedule, and keep sites logged in with encrypted login profiles. A stealth browser clicks, types and runs your scripts.
| POST | /browser/scrape | Scrape one URL now: markdown, text, HTML, links, metadata and extraction rules. |
| GET | /browser/crawls | List site crawls. |
| POST | /browser/crawls | Create a site crawl: start pages whose links it follows across the site. |
| DELETE | /browser/crawls/{crawlId} | Delete a site crawl and its stored pages. |
| GET | /browser/crawls/{crawlId} | Get a site crawl with its link counts. |
| PATCH | /browser/crawls/{crawlId} | Update a site crawl's configuration. |
| POST | /browser/crawls/{crawlId}/start | Start a crawl run, or resume the open one. |
| POST | /browser/crawls/{crawlId}/stop | Stop the running crawl. |
| DELETE | /browser/crawls/{crawlId}/links | Clear a site crawl's links. |
| GET | /browser/crawls/{crawlId}/links | List the links a site crawl found, with their status. |
| POST | /browser/crawls/{crawlId}/links | Add links to a site crawl's queue. |
| GET | /browser/crawls/{crawlId}/results | List the stored pages of a site crawl. |
| GET | /browser/crawls/{crawlId}/results/{urlHash} | Get the stored result of one crawled URL. |
| GET | /browser/profiles | List browser profiles, newest first. A profile's login is never returned. |
| POST | /browser/profiles | Create a browser profile: a saved login (cookies, localStorage, IndexedDB), stored encrypted, with a fixed user agent, locale, time zone, viewport and proxy country. Scrapes, crawls and browser jobs that name it start logged in. |
| DELETE | /browser/profiles/{profileId} | Delete a browser profile and its login. |
| GET | /browser/profiles/{profileId} | Get a browser profile with the sites its login covers. |
| PATCH | /browser/profiles/{profileId} | Update a browser profile's name, identity, default tunnel or login settings. |
| DELETE | /browser/profiles/{profileId}/state | Clear a browser profile's login: its next run starts logged out. |
| PUT | /browser/profiles/{profileId}/state | Import cookies into a browser profile: a JSON cookie export (Cookie-Editor, EditThisCookie, DevTools, Puppeteer), a Playwright storageState or a Netscape cookies.txt. merge keeps the cookies it does not replace. |
| POST | /browser/live | Open a live browser of a profile at url and get liveUrl, a page where a person logs in by hand, 2FA included. Saving there stores the login in the profile. |
| GET | /browser/live/{liveSessionId} | Get a live session: open, saved, cancelled, expired or failed. |
| POST | /browser/live/{liveSessionId}/stop | Close a live session without saving. |
| GET | /browser/skills | List the browser skills, per platform (Instagram, Facebook, Threads, TikTok, any website), with their parameters, whether they need a signed-in browser profile and their daily limit. Run them with a skills job (POST /v1/jobs with skills). |
Scrape one URL now: markdown, text, HTML, links, metadata and extraction rules.
/v1/browser/scrapeBills 2 units for an HTTP fetch and 20 when a browser renders the page (engine browser, auto or chromium), plus 30 per MB through hoshime's residential proxy.
Request body
actionsAction[] | |
heightinteger (int32) | |
keystring | |
maxLoopsinteger (int32) | |
msinteger (int32) | |
optionalboolean | null | |
scriptstring | |
selectorstring | |
textstring | |
typestring required | |
urlstring | |
urlPatternstring | |
valuesstring[] | |
widthinteger (int32) | |
argsstring | |
blockAdsboolean | null | |
blockResourcesstring[] | |
cookiesCookie[] | |
domainstring | |
namestring required | |
pathstring | |
valuestring | |
countrystring | |
darkModeboolean | |
delayMsinteger (int32) | |
enginestring | |
extractExtractRule[] | |
argstring | |
asstring | |
attrstring | |
fallbacksstring[] | |
fieldsExtractRule[] | |
jsonPathstring | |
listboolean | |
namestring required | |
regexstring | |
selectorstring required | |
selectorTypestring | |
typestring | |
formatsstring[] | |
headersmap | |
hideScrollbarsboolean | |
initScriptstring | |
largeEvaluateResultsboolean | |
localestring | |
networkLockboolean | |
onlyMainContentboolean | |
profileIdstring | |
proxystring | |
reducedMotionboolean | |
timeZonestring | |
timeoutSecondsinteger (int32) | |
tunnelstring | |
urlstring | |
userAgentstring | |
viewportDevicestring | |
viewportHeightinteger (int32) | |
viewportWidthinteger (int32) | |
waitForSelectorstring | |
waitUntilstring |
Response
24 fields
changeStatus | string |
data | object | null |
engine | string |
evaluateResults | any[] |
finalUrl | string |
html | string |
links | string[] |
markdown | string |
metadata | PageMetadata | null |
canonical | string |
description | string |
favicon | string |
jsonLd | any[] |
lang | string |
ogDescription | string |
ogImage | string |
ogTitle | string |
ogType | string |
siteName | string |
title | string |
statusCode | integer (int32) |
text | string |
truncated | boolean |
url | string |
curl -X POST "https://api.hoshime.com/v1/browser/scrape" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [ "…" ], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [ "…" ], "fields": [ { "arg": null, "as": null, "attr": null, "fallbacks": null, "fields": null, "jsonPath": null, "list": null, "name": null, "regex": null, "selector": null, "selectorType": null, "type": null } ], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }'
const res = await fetch("https://api.hoshime.com/v1/browser/scrape", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [ "…" ], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [ "…" ], "fields": [ { "arg": null, "as": null, "attr": null, "fallbacks": null, "fields": null, "jsonPath": null, "list": null, "name": null, "regex": null, "selector": null, "selectorType": null, "type": null } ], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/scrape", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": None, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [ "…" ], "width": 0 } ], "args": "…", "blockAds": False, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": False, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [ "…" ], "fields": [ { "arg": None, "as": None, "attr": None, "fallbacks": None, "fields": None, "jsonPath": None, "list": None, "name": None, "regex": None, "selector": None, "selectorType": None, "type": None } ], "jsonPath": "…", "list": False, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": False, "initScript": "…", "largeEvaluateResults": False, "locale": "…", "networkLock": False, "onlyMainContent": False, "profileId": "abc123", "proxy": "…", "reducedMotion": False, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, ) body = res.json()
{ "changeStatus": "…", "data": {}, "engine": "…", "evaluateResults": [ null ], "finalUrl": "https://…", "html": "…", "links": [ "…" ], "markdown": "…", "metadata": { "canonical": "…", "description": "…", "favicon": "…", "jsonLd": [ null ], "lang": "…", "ogDescription": "…", "ogImage": "…", "ogTitle": "…", "ogType": "…", "siteName": "…", "title": "…" }, "statusCode": 0, "text": "…", "truncated": false, "url": "https://…" }
List site crawls.
/v1/browser/crawlsParameters
pageinteger | |
limitinteger | |
withTotalboolean |
Response
74 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | Crawl[] |
clientRef | string |
config | CrawlConfig | null |
allowExternalLinks | boolean |
allowPatterns | string[] |
allowedDomains | string[] |
concurrency | integer (int32) |
crawlDelayMs | integer (int32) |
denyPatterns | string[] |
extractAllowPatterns | string[] |
extractDenyPatterns | string[] |
maxAttempts | integer (int32) |
maxDepth | integer (int32) | null |
maxPages | integer (int32) |
maxPagesPerDay | integer (int32) |
maxPagesPerHour | integer (int32) |
maxPagesPerMonth | integer (int32) |
recrawlEveryHours | integer (int32) |
respectRobotsTxt | boolean |
sitemap | string |
startUrls | string[] |
counts | LinkCounts | null |
done | integer (int64) |
failed | integer (int64) |
queued | integer (int64) |
running | integer (int64) |
skipped | integer (int64) |
crawlId | string |
createdAt | integer (int64) |
idempotencyKey | string | null |
name | string |
nextDispatchAt | integer (int64) |
request | ScrapeRequest | null |
actions | Action[] |
args | string |
blockAds | boolean | null |
blockResources | string[] |
cookies | Cookie[] |
country | string |
darkMode | boolean |
delayMs | integer (int32) |
engine | string |
extract | ExtractRule[] |
formats | string[] |
headers | map |
hideScrollbars | boolean |
initScript | string |
largeEvaluateResults | boolean |
locale | string |
networkLock | boolean |
onlyMainContent | boolean |
profileId | string |
proxy | string |
reducedMotion | boolean |
timeZone | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
userAgent | string |
viewportDevice | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
waitForSelector | string |
waitUntil | string |
runFinishedAt | integer (int64) | null |
runId | string |
runStartedAt | integer (int64) | null |
runtimeStatus | string |
status | string |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/browser/crawls" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/crawls", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "clientRef": "…", "config": null, "counts": null, "crawlId": "abc123", "createdAt": 0, "idempotencyKey": null, "name": "…", "nextDispatchAt": 0, "request": null, "runFinishedAt": null, "runId": "abc123", "runStartedAt": null, "runtimeStatus": "…", "status": "…", "updatedAt": 0 } ] }
Create a site crawl: start pages whose links it follows across the site.
/v1/browser/crawlsRequest body
configCrawlConfig | null required | |
allowExternalLinksboolean | |
allowPatternsstring[] | |
allowedDomainsstring[] | |
concurrencyinteger (int32) | |
crawlDelayMsinteger (int32) | |
denyPatternsstring[] | |
extractAllowPatternsstring[] | |
extractDenyPatternsstring[] | |
maxAttemptsinteger (int32) | |
maxDepthinteger (int32) | null | |
maxPagesinteger (int32) | |
maxPagesPerDayinteger (int32) | |
maxPagesPerHourinteger (int32) | |
maxPagesPerMonthinteger (int32) | |
recrawlEveryHoursinteger (int32) | |
respectRobotsTxtboolean | |
sitemapstring | |
startUrlsstring[] | |
idempotencyKeystring | |
namestring | |
requestScrapeRequest | null required | |
actionsAction[] | |
argsstring | |
blockAdsboolean | null | |
blockResourcesstring[] | |
cookiesCookie[] | |
countrystring | |
darkModeboolean | |
delayMsinteger (int32) | |
enginestring | |
extractExtractRule[] | |
formatsstring[] | |
headersmap | |
hideScrollbarsboolean | |
initScriptstring | |
largeEvaluateResultsboolean | |
localestring | |
networkLockboolean | |
onlyMainContentboolean | |
profileIdstring | |
proxystring | |
reducedMotionboolean | |
timeZonestring | |
timeoutSecondsinteger (int32) | |
tunnelstring | |
urlstring | |
userAgentstring | |
viewportDevicestring | |
viewportHeightinteger (int32) | |
viewportWidthinteger (int32) | |
waitForSelectorstring | |
waitUntilstring | |
startboolean |
Response
98 fields
clientRef | string |
config | CrawlConfig | null |
allowExternalLinks | boolean |
allowPatterns | string[] |
allowedDomains | string[] |
concurrency | integer (int32) |
crawlDelayMs | integer (int32) |
denyPatterns | string[] |
extractAllowPatterns | string[] |
extractDenyPatterns | string[] |
maxAttempts | integer (int32) |
maxDepth | integer (int32) | null |
maxPages | integer (int32) |
maxPagesPerDay | integer (int32) |
maxPagesPerHour | integer (int32) |
maxPagesPerMonth | integer (int32) |
recrawlEveryHours | integer (int32) |
respectRobotsTxt | boolean |
sitemap | string |
startUrls | string[] |
counts | LinkCounts | null |
done | integer (int64) |
failed | integer (int64) |
queued | integer (int64) |
running | integer (int64) |
skipped | integer (int64) |
crawlId | string |
createdAt | integer (int64) |
idempotencyKey | string | null |
name | string |
nextDispatchAt | integer (int64) |
request | ScrapeRequest | 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) |
args | string |
blockAds | boolean | null |
blockResources | string[] |
cookies | Cookie[] |
domain | string |
name | string |
path | string |
value | string |
country | string |
darkMode | boolean |
delayMs | integer (int32) |
engine | string |
extract | ExtractRule[] |
arg | string |
as | string |
attr | string |
fallbacks | string[] |
fields | ExtractRule[] |
jsonPath | string |
list | boolean |
name | string |
regex | string |
selector | string |
selectorType | string |
type | string |
formats | string[] |
headers | map |
hideScrollbars | boolean |
initScript | string |
largeEvaluateResults | boolean |
locale | string |
networkLock | boolean |
onlyMainContent | boolean |
profileId | string |
proxy | string |
reducedMotion | boolean |
timeZone | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
userAgent | string |
viewportDevice | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
waitForSelector | string |
waitUntil | string |
runFinishedAt | integer (int64) | null |
runId | string |
runStartedAt | integer (int64) | null |
runtimeStatus | string |
status | string |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/browser/crawls" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "idempotencyKey": "…", "name": "…", "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "start": false }'
const res = await fetch("https://api.hoshime.com/v1/browser/crawls", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "idempotencyKey": "…", "name": "…", "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "start": false }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/crawls", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "config": { "allowExternalLinks": False, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": False, "sitemap": "…", "startUrls": [ "…" ] }, "idempotencyKey": "…", "name": "…", "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": None, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": False, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": False, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": False, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": False, "initScript": "…", "largeEvaluateResults": False, "locale": "…", "networkLock": False, "onlyMainContent": False, "profileId": "abc123", "proxy": "…", "reducedMotion": False, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "start": False }, ) body = res.json()
{ "clientRef": "…", "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "counts": { "done": 0, "failed": 0, "queued": 0, "running": 0, "skipped": 0 }, "crawlId": "abc123", "createdAt": 0, "idempotencyKey": "…", "name": "…", "nextDispatchAt": 0, "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "runFinishedAt": 0, "runId": "abc123", "runStartedAt": 0, "runtimeStatus": "…", "status": "…", "updatedAt": 0 }
Delete a site crawl and its stored pages.
/v1/browser/crawls/{crawlId}Parameters
crawlIdstring · path required |
Response
1 fields
status | boolean |
curl -X DELETE "https://api.hoshime.com/v1/browser/crawls/{crawlId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.delete( "https://api.hoshime.com/v1/browser/crawls/{crawlId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "status": false }
Get a site crawl with its link counts.
/v1/browser/crawls/{crawlId}Parameters
crawlIdstring · path required |
Response
98 fields
clientRef | string |
config | CrawlConfig | null |
allowExternalLinks | boolean |
allowPatterns | string[] |
allowedDomains | string[] |
concurrency | integer (int32) |
crawlDelayMs | integer (int32) |
denyPatterns | string[] |
extractAllowPatterns | string[] |
extractDenyPatterns | string[] |
maxAttempts | integer (int32) |
maxDepth | integer (int32) | null |
maxPages | integer (int32) |
maxPagesPerDay | integer (int32) |
maxPagesPerHour | integer (int32) |
maxPagesPerMonth | integer (int32) |
recrawlEveryHours | integer (int32) |
respectRobotsTxt | boolean |
sitemap | string |
startUrls | string[] |
counts | LinkCounts | null |
done | integer (int64) |
failed | integer (int64) |
queued | integer (int64) |
running | integer (int64) |
skipped | integer (int64) |
crawlId | string |
createdAt | integer (int64) |
idempotencyKey | string | null |
name | string |
nextDispatchAt | integer (int64) |
request | ScrapeRequest | 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) |
args | string |
blockAds | boolean | null |
blockResources | string[] |
cookies | Cookie[] |
domain | string |
name | string |
path | string |
value | string |
country | string |
darkMode | boolean |
delayMs | integer (int32) |
engine | string |
extract | ExtractRule[] |
arg | string |
as | string |
attr | string |
fallbacks | string[] |
fields | ExtractRule[] |
jsonPath | string |
list | boolean |
name | string |
regex | string |
selector | string |
selectorType | string |
type | string |
formats | string[] |
headers | map |
hideScrollbars | boolean |
initScript | string |
largeEvaluateResults | boolean |
locale | string |
networkLock | boolean |
onlyMainContent | boolean |
profileId | string |
proxy | string |
reducedMotion | boolean |
timeZone | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
userAgent | string |
viewportDevice | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
waitForSelector | string |
waitUntil | string |
runFinishedAt | integer (int64) | null |
runId | string |
runStartedAt | integer (int64) | null |
runtimeStatus | string |
status | string |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/browser/crawls/{crawlId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/crawls/{crawlId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "clientRef": "…", "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "counts": { "done": 0, "failed": 0, "queued": 0, "running": 0, "skipped": 0 }, "crawlId": "abc123", "createdAt": 0, "idempotencyKey": "…", "name": "…", "nextDispatchAt": 0, "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "runFinishedAt": 0, "runId": "abc123", "runStartedAt": 0, "runtimeStatus": "…", "status": "…", "updatedAt": 0 }
Update a site crawl's configuration.
/v1/browser/crawls/{crawlId}Parameters
crawlIdstring · path required |
Request body
configCrawlConfig | null | |
allowExternalLinksboolean | |
allowPatternsstring[] | |
allowedDomainsstring[] | |
concurrencyinteger (int32) | |
crawlDelayMsinteger (int32) | |
denyPatternsstring[] | |
extractAllowPatternsstring[] | |
extractDenyPatternsstring[] | |
maxAttemptsinteger (int32) | |
maxDepthinteger (int32) | null | |
maxPagesinteger (int32) | |
maxPagesPerDayinteger (int32) | |
maxPagesPerHourinteger (int32) | |
maxPagesPerMonthinteger (int32) | |
recrawlEveryHoursinteger (int32) | |
respectRobotsTxtboolean | |
sitemapstring | |
startUrlsstring[] | |
namestring | |
requestScrapeRequest | null | |
actionsAction[] | |
argsstring | |
blockAdsboolean | null | |
blockResourcesstring[] | |
cookiesCookie[] | |
countrystring | |
darkModeboolean | |
delayMsinteger (int32) | |
enginestring | |
extractExtractRule[] | |
formatsstring[] | |
headersmap | |
hideScrollbarsboolean | |
initScriptstring | |
largeEvaluateResultsboolean | |
localestring | |
networkLockboolean | |
onlyMainContentboolean | |
profileIdstring | |
proxystring | |
reducedMotionboolean | |
timeZonestring | |
timeoutSecondsinteger (int32) | |
tunnelstring | |
urlstring | |
userAgentstring | |
viewportDevicestring | |
viewportHeightinteger (int32) | |
viewportWidthinteger (int32) | |
waitForSelectorstring | |
waitUntilstring |
Response
98 fields
clientRef | string |
config | CrawlConfig | null |
allowExternalLinks | boolean |
allowPatterns | string[] |
allowedDomains | string[] |
concurrency | integer (int32) |
crawlDelayMs | integer (int32) |
denyPatterns | string[] |
extractAllowPatterns | string[] |
extractDenyPatterns | string[] |
maxAttempts | integer (int32) |
maxDepth | integer (int32) | null |
maxPages | integer (int32) |
maxPagesPerDay | integer (int32) |
maxPagesPerHour | integer (int32) |
maxPagesPerMonth | integer (int32) |
recrawlEveryHours | integer (int32) |
respectRobotsTxt | boolean |
sitemap | string |
startUrls | string[] |
counts | LinkCounts | null |
done | integer (int64) |
failed | integer (int64) |
queued | integer (int64) |
running | integer (int64) |
skipped | integer (int64) |
crawlId | string |
createdAt | integer (int64) |
idempotencyKey | string | null |
name | string |
nextDispatchAt | integer (int64) |
request | ScrapeRequest | 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) |
args | string |
blockAds | boolean | null |
blockResources | string[] |
cookies | Cookie[] |
domain | string |
name | string |
path | string |
value | string |
country | string |
darkMode | boolean |
delayMs | integer (int32) |
engine | string |
extract | ExtractRule[] |
arg | string |
as | string |
attr | string |
fallbacks | string[] |
fields | ExtractRule[] |
jsonPath | string |
list | boolean |
name | string |
regex | string |
selector | string |
selectorType | string |
type | string |
formats | string[] |
headers | map |
hideScrollbars | boolean |
initScript | string |
largeEvaluateResults | boolean |
locale | string |
networkLock | boolean |
onlyMainContent | boolean |
profileId | string |
proxy | string |
reducedMotion | boolean |
timeZone | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
userAgent | string |
viewportDevice | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
waitForSelector | string |
waitUntil | string |
runFinishedAt | integer (int64) | null |
runId | string |
runStartedAt | integer (int64) | null |
runtimeStatus | string |
status | string |
updatedAt | integer (int64) |
curl -X PATCH "https://api.hoshime.com/v1/browser/crawls/{crawlId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "name": "…", "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" } }'
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "name": "…", "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" } }), }); const { data, meta } = await res.json();
import os, requests res = requests.patch( "https://api.hoshime.com/v1/browser/crawls/{crawlId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "config": { "allowExternalLinks": False, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": False, "sitemap": "…", "startUrls": [ "…" ] }, "name": "…", "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": None, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": False, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": False, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": False, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": False, "initScript": "…", "largeEvaluateResults": False, "locale": "…", "networkLock": False, "onlyMainContent": False, "profileId": "abc123", "proxy": "…", "reducedMotion": False, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" } }, ) body = res.json()
{ "clientRef": "…", "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "counts": { "done": 0, "failed": 0, "queued": 0, "running": 0, "skipped": 0 }, "crawlId": "abc123", "createdAt": 0, "idempotencyKey": "…", "name": "…", "nextDispatchAt": 0, "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "runFinishedAt": 0, "runId": "abc123", "runStartedAt": 0, "runtimeStatus": "…", "status": "…", "updatedAt": 0 }
Start a crawl run, or resume the open one.
/v1/browser/crawls/{crawlId}/startEach crawled page bills 2 units, or 20 when the browser rendered it, plus 30 per MB through hoshime's residential proxy, recorded when the page is done. Skipped links are free.
Parameters
crawlIdstring · path required |
Request body
recrawlboolean |
Response
98 fields
clientRef | string |
config | CrawlConfig | null |
allowExternalLinks | boolean |
allowPatterns | string[] |
allowedDomains | string[] |
concurrency | integer (int32) |
crawlDelayMs | integer (int32) |
denyPatterns | string[] |
extractAllowPatterns | string[] |
extractDenyPatterns | string[] |
maxAttempts | integer (int32) |
maxDepth | integer (int32) | null |
maxPages | integer (int32) |
maxPagesPerDay | integer (int32) |
maxPagesPerHour | integer (int32) |
maxPagesPerMonth | integer (int32) |
recrawlEveryHours | integer (int32) |
respectRobotsTxt | boolean |
sitemap | string |
startUrls | string[] |
counts | LinkCounts | null |
done | integer (int64) |
failed | integer (int64) |
queued | integer (int64) |
running | integer (int64) |
skipped | integer (int64) |
crawlId | string |
createdAt | integer (int64) |
idempotencyKey | string | null |
name | string |
nextDispatchAt | integer (int64) |
request | ScrapeRequest | 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) |
args | string |
blockAds | boolean | null |
blockResources | string[] |
cookies | Cookie[] |
domain | string |
name | string |
path | string |
value | string |
country | string |
darkMode | boolean |
delayMs | integer (int32) |
engine | string |
extract | ExtractRule[] |
arg | string |
as | string |
attr | string |
fallbacks | string[] |
fields | ExtractRule[] |
jsonPath | string |
list | boolean |
name | string |
regex | string |
selector | string |
selectorType | string |
type | string |
formats | string[] |
headers | map |
hideScrollbars | boolean |
initScript | string |
largeEvaluateResults | boolean |
locale | string |
networkLock | boolean |
onlyMainContent | boolean |
profileId | string |
proxy | string |
reducedMotion | boolean |
timeZone | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
userAgent | string |
viewportDevice | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
waitForSelector | string |
waitUntil | string |
runFinishedAt | integer (int64) | null |
runId | string |
runStartedAt | integer (int64) | null |
runtimeStatus | string |
status | string |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/browser/crawls/{crawlId}/start" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "recrawl": false }'
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/start", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "recrawl": false }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/start", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "recrawl": False }, ) body = res.json()
{ "clientRef": "…", "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "counts": { "done": 0, "failed": 0, "queued": 0, "running": 0, "skipped": 0 }, "crawlId": "abc123", "createdAt": 0, "idempotencyKey": "…", "name": "…", "nextDispatchAt": 0, "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "runFinishedAt": 0, "runId": "abc123", "runStartedAt": 0, "runtimeStatus": "…", "status": "…", "updatedAt": 0 }
Stop the running crawl.
/v1/browser/crawls/{crawlId}/stopParameters
crawlIdstring · path required |
Response
98 fields
clientRef | string |
config | CrawlConfig | null |
allowExternalLinks | boolean |
allowPatterns | string[] |
allowedDomains | string[] |
concurrency | integer (int32) |
crawlDelayMs | integer (int32) |
denyPatterns | string[] |
extractAllowPatterns | string[] |
extractDenyPatterns | string[] |
maxAttempts | integer (int32) |
maxDepth | integer (int32) | null |
maxPages | integer (int32) |
maxPagesPerDay | integer (int32) |
maxPagesPerHour | integer (int32) |
maxPagesPerMonth | integer (int32) |
recrawlEveryHours | integer (int32) |
respectRobotsTxt | boolean |
sitemap | string |
startUrls | string[] |
counts | LinkCounts | null |
done | integer (int64) |
failed | integer (int64) |
queued | integer (int64) |
running | integer (int64) |
skipped | integer (int64) |
crawlId | string |
createdAt | integer (int64) |
idempotencyKey | string | null |
name | string |
nextDispatchAt | integer (int64) |
request | ScrapeRequest | 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) |
args | string |
blockAds | boolean | null |
blockResources | string[] |
cookies | Cookie[] |
domain | string |
name | string |
path | string |
value | string |
country | string |
darkMode | boolean |
delayMs | integer (int32) |
engine | string |
extract | ExtractRule[] |
arg | string |
as | string |
attr | string |
fallbacks | string[] |
fields | ExtractRule[] |
jsonPath | string |
list | boolean |
name | string |
regex | string |
selector | string |
selectorType | string |
type | string |
formats | string[] |
headers | map |
hideScrollbars | boolean |
initScript | string |
largeEvaluateResults | boolean |
locale | string |
networkLock | boolean |
onlyMainContent | boolean |
profileId | string |
proxy | string |
reducedMotion | boolean |
timeZone | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
userAgent | string |
viewportDevice | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
waitForSelector | string |
waitUntil | string |
runFinishedAt | integer (int64) | null |
runId | string |
runStartedAt | integer (int64) | null |
runtimeStatus | string |
status | string |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/browser/crawls/{crawlId}/stop" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/stop", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/stop", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "clientRef": "…", "config": { "allowExternalLinks": false, "allowPatterns": [ "…" ], "allowedDomains": [ "…" ], "concurrency": 0, "crawlDelayMs": 0, "denyPatterns": [ "…" ], "extractAllowPatterns": [ "…" ], "extractDenyPatterns": [ "…" ], "maxAttempts": 0, "maxDepth": 0, "maxPages": 0, "maxPagesPerDay": 0, "maxPagesPerHour": 0, "maxPagesPerMonth": 0, "recrawlEveryHours": 0, "respectRobotsTxt": false, "sitemap": "…", "startUrls": [ "…" ] }, "counts": { "done": 0, "failed": 0, "queued": 0, "running": 0, "skipped": 0 }, "crawlId": "abc123", "createdAt": 0, "idempotencyKey": "…", "name": "…", "nextDispatchAt": 0, "request": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "args": "…", "blockAds": false, "blockResources": [ "…" ], "cookies": [ { "domain": "…", "name": "…", "path": "…", "value": "…" } ], "country": "…", "darkMode": false, "delayMs": 0, "engine": "…", "extract": [ { "arg": "…", "as": "…", "attr": "…", "fallbacks": [], "fields": [], "jsonPath": "…", "list": false, "name": "…", "regex": "…", "selector": "…", "selectorType": "…", "type": "…" } ], "formats": [ "…" ], "headers": {}, "hideScrollbars": false, "initScript": "…", "largeEvaluateResults": false, "locale": "…", "networkLock": false, "onlyMainContent": false, "profileId": "abc123", "proxy": "…", "reducedMotion": false, "timeZone": "…", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…", "userAgent": "…", "viewportDevice": "…", "viewportHeight": 0, "viewportWidth": 0, "waitForSelector": "…", "waitUntil": "…" }, "runFinishedAt": 0, "runId": "abc123", "runStartedAt": 0, "runtimeStatus": "…", "status": "…", "updatedAt": 0 }
Clear a site crawl's links.
/v1/browser/crawls/{crawlId}/linksParameters
crawlIdstring · path required |
Response
1 fields
status | boolean |
curl -X DELETE "https://api.hoshime.com/v1/browser/crawls/{crawlId}/links" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/links", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.delete( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/links", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "status": false }
List the links a site crawl found, with their status.
/v1/browser/crawls/{crawlId}/linksParameters
crawlIdstring · path required | |
statusstring | |
pageinteger | |
limitinteger | |
withTotalboolean |
Response
20 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | CrawlLink[] |
attempt | integer (int32) |
crawlId | string |
createdAt | integer (int64) |
depth | integer (int32) |
host | string |
kind | string |
lastError | string |
lastScrapedAt | integer (int64) | null |
leaseUntil | integer (int64) | null |
nextAttemptAt | integer (int64) |
status | string |
ttl | integer (int64) |
updatedAt | integer (int64) |
url | string |
urlHash | string |
curl "https://api.hoshime.com/v1/browser/crawls/{crawlId}/links" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/links", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/links", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "attempt": 0, "crawlId": "abc123", "createdAt": 0, "depth": 0, "host": "…", "kind": "…", "lastError": "…", "lastScrapedAt": null, "leaseUntil": null, "nextAttemptAt": 0, "status": "…", "ttl": 0, "updatedAt": 0, "url": "https://…", "urlHash": "…" } ] }
Add links to a site crawl's queue.
/v1/browser/crawls/{crawlId}/linksParameters
crawlIdstring · path required |
Request body
urlsstring[] required |
Response
3 fields
queued | integer (int32) |
requested | integer (int32) |
skipped | integer (int32) |
curl -X POST "https://api.hoshime.com/v1/browser/crawls/{crawlId}/links" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "urls": [ "…" ] }'
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/links", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "urls": [ "…" ] }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/links", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "urls": [ "…" ] }, ) body = res.json()
{ "queued": 0, "requested": 0, "skipped": 0 }
List the stored pages of a site crawl.
/v1/browser/crawls/{crawlId}/resultsParameters
crawlIdstring · path required | |
pageinteger | |
limitinteger | |
withTotalboolean | |
runIdstring | |
sinceinteger | |
changedOnlyboolean |
Response
25 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | CrawlResult[] |
crawlId | string |
result | ScrapeResult | null |
changeStatus | string |
data | object | null |
engine | string |
evaluateResults | any[] |
finalUrl | string |
html | string |
links | string[] |
markdown | string |
metadata | PageMetadata | null |
statusCode | integer (int32) |
text | string |
truncated | boolean |
url | string |
runId | string |
scrapedAt | integer (int64) |
ttl | integer (int64) |
url | string |
urlHash | string |
curl "https://api.hoshime.com/v1/browser/crawls/{crawlId}/results" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/results", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/results", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "crawlId": "abc123", "result": null, "runId": "abc123", "scrapedAt": 0, "ttl": 0, "url": "https://…", "urlHash": "…" } ] }
Get the stored result of one crawled URL.
/v1/browser/crawls/{crawlId}/results/{urlHash}Parameters
crawlIdstring · path required | |
urlHashstring · path required |
Response
31 fields
crawlId | string |
result | ScrapeResult | null |
changeStatus | string |
data | object | null |
engine | string |
evaluateResults | any[] |
finalUrl | string |
html | string |
links | string[] |
markdown | string |
metadata | PageMetadata | null |
canonical | string |
description | string |
favicon | string |
jsonLd | any[] |
lang | string |
ogDescription | string |
ogImage | string |
ogTitle | string |
ogType | string |
siteName | string |
title | string |
statusCode | integer (int32) |
text | string |
truncated | boolean |
url | string |
runId | string |
scrapedAt | integer (int64) |
ttl | integer (int64) |
url | string |
urlHash | string |
curl "https://api.hoshime.com/v1/browser/crawls/{crawlId}/results/{urlHash}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/crawls/{crawlId}/results/{urlHash}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/crawls/{crawlId}/results/{urlHash}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "crawlId": "abc123", "result": { "changeStatus": "…", "data": {}, "engine": "…", "evaluateResults": [ null ], "finalUrl": "https://…", "html": "…", "links": [ "…" ], "markdown": "…", "metadata": { "canonical": "…", "description": "…", "favicon": "…", "jsonLd": [ null ], "lang": "…", "ogDescription": "…", "ogImage": "…", "ogTitle": "…", "ogType": "…", "siteName": "…", "title": "…" }, "statusCode": 0, "text": "…", "truncated": false, "url": "https://…" }, "runId": "abc123", "scrapedAt": 0, "ttl": 0, "url": "https://…", "urlHash": "…" }
List browser profiles, newest first. A profile's login is never returned.
/v1/browser/profilesParameters
pageinteger | |
limitinteger | |
withTotalboolean |
Response
23 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | BrowserProfile[] |
cookieCount | integer (int32) |
country | string |
createdAt | integer (int64) |
domains | string[] |
lastUsedAt | integer (int64) | null |
locale | string |
name | string |
originCount | integer (int32) |
profileId | string |
saveChanges | boolean |
stateBytes | integer (int32) |
stateUpdatedAt | integer (int64) | null |
timeZone | string |
tunnel | string |
updatedAt | integer (int64) |
userAgent | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
curl "https://api.hoshime.com/v1/browser/profiles" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/profiles", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/profiles", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "cookieCount": 1280, "country": "…", "createdAt": 0, "domains": [ "…" ], "lastUsedAt": null, "locale": "…", "name": "…", "originCount": 1280, "profileId": "abc123", "saveChanges": false, "stateBytes": 0, "stateUpdatedAt": null, "timeZone": "…", "tunnel": "…", "updatedAt": 0, "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 } ] }
Create a browser profile: a saved login (cookies, localStorage, IndexedDB), stored encrypted, with a fixed user agent, locale, time zone, viewport and proxy country. Scrapes, crawls and browser jobs that name it start logged in.
/v1/browser/profilesRequest body
countrystring | |
localestring | |
namestring required | |
reuseByNameboolean | |
saveChangesboolean | null | |
timeZonestring | |
tunnelstring | |
userAgentstring | |
viewportHeightinteger (int32) | |
viewportWidthinteger (int32) |
Response
18 fields
cookieCount | integer (int32) |
country | string |
createdAt | integer (int64) |
domains | string[] |
lastUsedAt | integer (int64) | null |
locale | string |
name | string |
originCount | integer (int32) |
profileId | string |
saveChanges | boolean |
stateBytes | integer (int32) |
stateUpdatedAt | integer (int64) | null |
timeZone | string |
tunnel | string |
updatedAt | integer (int64) |
userAgent | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
curl -X POST "https://api.hoshime.com/v1/browser/profiles" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "country": "…", "locale": "…", "name": "…", "reuseByName": false, "saveChanges": false, "timeZone": "…", "tunnel": "…", "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }'
const res = await fetch("https://api.hoshime.com/v1/browser/profiles", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "country": "…", "locale": "…", "name": "…", "reuseByName": false, "saveChanges": false, "timeZone": "…", "tunnel": "…", "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/profiles", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "country": "…", "locale": "…", "name": "…", "reuseByName": False, "saveChanges": False, "timeZone": "…", "tunnel": "…", "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }, ) body = res.json()
{ "cookieCount": 1280, "country": "…", "createdAt": 0, "domains": [ "…" ], "lastUsedAt": 0, "locale": "…", "name": "…", "originCount": 1280, "profileId": "abc123", "saveChanges": false, "stateBytes": 0, "stateUpdatedAt": 0, "timeZone": "…", "tunnel": "…", "updatedAt": 0, "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }
Delete a browser profile and its login.
/v1/browser/profiles/{profileId}Parameters
profileIdstring · path required |
Response
1 fields
status | boolean |
curl -X DELETE "https://api.hoshime.com/v1/browser/profiles/{profileId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/profiles/{profileId}", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.delete( "https://api.hoshime.com/v1/browser/profiles/{profileId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "status": false }
Get a browser profile with the sites its login covers.
/v1/browser/profiles/{profileId}Parameters
profileIdstring · path required |
Response
18 fields
cookieCount | integer (int32) |
country | string |
createdAt | integer (int64) |
domains | string[] |
lastUsedAt | integer (int64) | null |
locale | string |
name | string |
originCount | integer (int32) |
profileId | string |
saveChanges | boolean |
stateBytes | integer (int32) |
stateUpdatedAt | integer (int64) | null |
timeZone | string |
tunnel | string |
updatedAt | integer (int64) |
userAgent | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
curl "https://api.hoshime.com/v1/browser/profiles/{profileId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/profiles/{profileId}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/profiles/{profileId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "cookieCount": 1280, "country": "…", "createdAt": 0, "domains": [ "…" ], "lastUsedAt": 0, "locale": "…", "name": "…", "originCount": 1280, "profileId": "abc123", "saveChanges": false, "stateBytes": 0, "stateUpdatedAt": 0, "timeZone": "…", "tunnel": "…", "updatedAt": 0, "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }
Update a browser profile's name, identity, default tunnel or login settings.
/v1/browser/profiles/{profileId}Parameters
profileIdstring · path required |
Request body
countrystring | null | |
localestring | null | |
namestring | null | |
saveChangesboolean | null | |
timeZonestring | null | |
tunnelstring | null | |
userAgentstring | null | |
viewportHeightinteger (int32) | null | |
viewportWidthinteger (int32) | null |
Response
18 fields
cookieCount | integer (int32) |
country | string |
createdAt | integer (int64) |
domains | string[] |
lastUsedAt | integer (int64) | null |
locale | string |
name | string |
originCount | integer (int32) |
profileId | string |
saveChanges | boolean |
stateBytes | integer (int32) |
stateUpdatedAt | integer (int64) | null |
timeZone | string |
tunnel | string |
updatedAt | integer (int64) |
userAgent | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
curl -X PATCH "https://api.hoshime.com/v1/browser/profiles/{profileId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "country": "…", "locale": "…", "name": "…", "saveChanges": false, "timeZone": "…", "tunnel": "…", "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }'
const res = await fetch("https://api.hoshime.com/v1/browser/profiles/{profileId}", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "country": "…", "locale": "…", "name": "…", "saveChanges": false, "timeZone": "…", "tunnel": "…", "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }), }); const { data, meta } = await res.json();
import os, requests res = requests.patch( "https://api.hoshime.com/v1/browser/profiles/{profileId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "country": "…", "locale": "…", "name": "…", "saveChanges": False, "timeZone": "…", "tunnel": "…", "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }, ) body = res.json()
{ "cookieCount": 1280, "country": "…", "createdAt": 0, "domains": [ "…" ], "lastUsedAt": 0, "locale": "…", "name": "…", "originCount": 1280, "profileId": "abc123", "saveChanges": false, "stateBytes": 0, "stateUpdatedAt": 0, "timeZone": "…", "tunnel": "…", "updatedAt": 0, "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }
Clear a browser profile's login: its next run starts logged out.
/v1/browser/profiles/{profileId}/stateParameters
profileIdstring · path required |
Response
18 fields
cookieCount | integer (int32) |
country | string |
createdAt | integer (int64) |
domains | string[] |
lastUsedAt | integer (int64) | null |
locale | string |
name | string |
originCount | integer (int32) |
profileId | string |
saveChanges | boolean |
stateBytes | integer (int32) |
stateUpdatedAt | integer (int64) | null |
timeZone | string |
tunnel | string |
updatedAt | integer (int64) |
userAgent | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
curl -X DELETE "https://api.hoshime.com/v1/browser/profiles/{profileId}/state" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/profiles/{profileId}/state", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.delete( "https://api.hoshime.com/v1/browser/profiles/{profileId}/state", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "cookieCount": 1280, "country": "…", "createdAt": 0, "domains": [ "…" ], "lastUsedAt": 0, "locale": "…", "name": "…", "originCount": 1280, "profileId": "abc123", "saveChanges": false, "stateBytes": 0, "stateUpdatedAt": 0, "timeZone": "…", "tunnel": "…", "updatedAt": 0, "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }
Import cookies into a browser profile: a JSON cookie export (Cookie-Editor, EditThisCookie, DevTools, Puppeteer), a Playwright storageState or a Netscape cookies.txt. merge keeps the cookies it does not replace.
/v1/browser/profiles/{profileId}/stateParameters
profileIdstring · path required |
Request body
datastring required | |
mergeboolean |
Response
18 fields
cookieCount | integer (int32) |
country | string |
createdAt | integer (int64) |
domains | string[] |
lastUsedAt | integer (int64) | null |
locale | string |
name | string |
originCount | integer (int32) |
profileId | string |
saveChanges | boolean |
stateBytes | integer (int32) |
stateUpdatedAt | integer (int64) | null |
timeZone | string |
tunnel | string |
updatedAt | integer (int64) |
userAgent | string |
viewportHeight | integer (int32) |
viewportWidth | integer (int32) |
curl -X PUT "https://api.hoshime.com/v1/browser/profiles/{profileId}/state" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "data": "…", "merge": false }'
const res = await fetch("https://api.hoshime.com/v1/browser/profiles/{profileId}/state", { method: "PUT", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "data": "…", "merge": false }), }); const { data, meta } = await res.json();
import os, requests res = requests.put( "https://api.hoshime.com/v1/browser/profiles/{profileId}/state", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "data": "…", "merge": False }, ) body = res.json()
{ "cookieCount": 1280, "country": "…", "createdAt": 0, "domains": [ "…" ], "lastUsedAt": 0, "locale": "…", "name": "…", "originCount": 1280, "profileId": "abc123", "saveChanges": false, "stateBytes": 0, "stateUpdatedAt": 0, "timeZone": "…", "tunnel": "…", "updatedAt": 0, "userAgent": "…", "viewportHeight": 0, "viewportWidth": 0 }
Open a live browser of a profile at url and get liveUrl, a page where a person logs in by hand, 2FA included. Saving there stores the login in the profile.
/v1/browser/liveOpening it bills nothing. The session bills 50 units per started minute it is open, at least 50, recorded when it ends: saved, stopped or expired; a failed one bills nothing. It also bills 30 per MB its browser moved through hoshime's residential proxy.
Request body
maxSecondsinteger (int32) | |
profileIdstring required | |
tunnelstring | |
urlstring required |
Response
10 fields
createdAt | integer (int64) |
errorCode | string |
errorMessage | string |
expiresAt | integer (int64) |
finishedAt | integer (int64) | null |
liveSessionId | string |
liveUrl | string |
profileId | string |
status | string |
url | string |
curl -X POST "https://api.hoshime.com/v1/browser/live" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "maxSeconds": 0, "profileId": "abc123", "tunnel": "…", "url": "https://…" }'
const res = await fetch("https://api.hoshime.com/v1/browser/live", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "maxSeconds": 0, "profileId": "abc123", "tunnel": "…", "url": "https://…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/live", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "maxSeconds": 0, "profileId": "abc123", "tunnel": "…", "url": "https://…" }, ) body = res.json()
{ "createdAt": 0, "errorCode": "…", "errorMessage": "…", "expiresAt": 0, "finishedAt": 0, "liveSessionId": "abc123", "liveUrl": "https://…", "profileId": "abc123", "status": "…", "url": "https://…" }
Get a live session: open, saved, cancelled, expired or failed.
/v1/browser/live/{liveSessionId}Parameters
liveSessionIdstring · path required |
Response
10 fields
createdAt | integer (int64) |
errorCode | string |
errorMessage | string |
expiresAt | integer (int64) |
finishedAt | integer (int64) | null |
liveSessionId | string |
liveUrl | string |
profileId | string |
status | string |
url | string |
curl "https://api.hoshime.com/v1/browser/live/{liveSessionId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/live/{liveSessionId}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/live/{liveSessionId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "createdAt": 0, "errorCode": "…", "errorMessage": "…", "expiresAt": 0, "finishedAt": 0, "liveSessionId": "abc123", "liveUrl": "https://…", "profileId": "abc123", "status": "…", "url": "https://…" }
Close a live session without saving.
/v1/browser/live/{liveSessionId}/stopParameters
liveSessionIdstring · path required |
Response
10 fields
createdAt | integer (int64) |
errorCode | string |
errorMessage | string |
expiresAt | integer (int64) |
finishedAt | integer (int64) | null |
liveSessionId | string |
liveUrl | string |
profileId | string |
status | string |
url | string |
curl -X POST "https://api.hoshime.com/v1/browser/live/{liveSessionId}/stop" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/live/{liveSessionId}/stop", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/browser/live/{liveSessionId}/stop", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "createdAt": 0, "errorCode": "…", "errorMessage": "…", "expiresAt": 0, "finishedAt": 0, "liveSessionId": "abc123", "liveUrl": "https://…", "profileId": "abc123", "status": "…", "url": "https://…" }
List the browser skills, per platform (Instagram, Facebook, Threads, TikTok, any website), with their parameters, whether they need a signed-in browser profile and their daily limit. Run them with a skills job (POST /v1/jobs with skills).
/v1/browser/skillsParameters
platformstring | |
pageinteger | |
limitinteger | |
withTotalboolean |
Response
16 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | SkillPlatform[] |
home | string |
name | string |
skills | Skill[] |
dailyLimit | integer (int32) |
description | string |
login | boolean |
name | string |
params | SkillParam[] |
platform | string |
title | string |
title | string |
curl "https://api.hoshime.com/v1/browser/skills" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/browser/skills", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/browser/skills", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "home": "…", "name": "…", "skills": [ { "dailyLimit": null, "description": null, "login": null, "name": null, "params": null, "platform": null, "title": null } ], "title": "…" } ] }