$sudofetch

API reference

All requests go to https://api.sudofetch.com with Authorization: Bearer <key>.

Endpoints

MethodPathBehavior
POST/v1/scrapeSubmit one durable scrape. 200 is terminal; 202 supplies job_id for polling.
GET/v1/jobs/:idRead job state and result. Deleted or expired results return 410.
POST/v1/jobs/:id/cancelCancel a job and return its authoritative state.
DELETE/v1/jobs/:id/resultDelete access to a successful stored result.
GET/v1/usageRead settled charges, open reservations, adjustments, and job counts.
POST/v1/billing/checkoutCreate a checkout session with {"pack":"configured-pack-id"}. Returns a redirect URL.

Submitting a scrape

FieldTypeDefaultNotes
urlstring—Public http or https URL.
formatmarkdown · html · textmarkdownHTML output is a minimal document with title and description.
modeauto · basic · stealthautoWhich levels the job may use.
max_creditsinteger1 (basic, trial) or 15Caps the charge and the transfer each attempt may use.
timeout_msinteger ≤ 9000030000Total execution budget across all levels.
wait_msinteger ≤ 6000030000How long the request itself waits before returning 202.
wait_forCSS selector or milliseconds—Extra readiness condition before capture.
block_assetsbooleantrueSkip images, fonts and media to save transfer.

The job object

FieldMeaning
statusqueued, running, succeeded, failed or canceled.
errorWhy a job failed; see errors.
content, format, metadataThe extracted page and its title, description, language and canonical URL.
stats.mode_usedThe level that succeeded: direct, residential or premium.
stats.attemptsBrowser attempts made, across levels.
credits.chargedWhat the job cost; 0 for anything but success.
credits.billable_bytesThe transfer the charge was based on.