Base URL
A site’s own data, like a Reddit search or a YouTube transcript, comes from scrape with a parser. A field an endpoint does not take returns
400.
Authentication
Create a key at stophy.dev/signup and send it as a bearer token.401 with code apiKeyRequired, a signupUrl for a person and a signup call for an agent. Search, scrape, map and parse also work without a key, within the free limits.
Responses
Each endpoint answers in its own shape, and each endpoint’s page shows a real response. Search returnssuccess, data and creditsUsed:
data, and scrape puts its cost in data.metadata.creditsUsed. Map returns links. Crawl, batch scrape and extract return a job id, and their status calls return status, the pages or fields in data, and creditsUsed. The account calls add requestId.
Empty values are left out. Every response has an X-Request-ID header and an x-credits-used header. To cut long text, add ?maxTextLength=<characters> to the URL: longer text ends with ….
A failed call returns an error status and a flat body: { "success": false, "error": "<what went wrong>", "code": "<code>" }. See Errors.
Cost
creditsUsed is what the call cost in credits. Most calls cost 1 credit, and a call that fails costs nothing. See Pricing.