Schemas
Zod schemas overview and cheat sheet for the Deepcrawl API.
Guides
- Load schemas from one place:
deepcrawl/schemasaggregates every Zod definition so downstream apps, Workers, and SDKs stay in sync. - Validate requests and responses: Pair these schemas with
deepcrawl/typesto guarantee runtime validation matches TypeScript expectations. - Avoid circular imports internally: Inside
packages/types, use relative paths as documented inschemas.ts. External consumers should use the barrel.
Import Cheat Sheet
Common Schemas
import {
BaseErrorResponseSchema,
BaseSuccessResponseSchema,
} from 'deepcrawl/schemas';Router Schemas
// Read endpoints
import {
GetMarkdownOptionsSchema,
GetMarkdownResponseSchema,
ReadOptionsSchema,
ReadUrlResponseSchema,
ReadSuccessResponseSchema,
ReadErrorResponseSchema,
} from 'deepcrawl/schemas';
// Links endpoints
import {
LinksOptionsSchema,
GetLinksOptionsSchema,
ExtractLinksOptionsSchema,
GetLinksResponseSchema,
GetLinksResponseWithTreeSchema,
GetLinksResponseWithoutTreeSchema,
ExtractLinksResponseSchema,
ExtractLinksResponseWithTreeSchema,
ExtractLinksResponseWithoutTreeSchema,
LinksSuccessResponseSchema,
LinksSuccessResponseWithTreeSchema,
LinksSuccessResponseWithoutTreeSchema,
LinksErrorResponseSchema,
LinksTreeSchema,
} from 'deepcrawl/schemas';
// Logs endpoints
import {
ListLogsOptionsSchema,
ListLogsResponseSchema,
GetOneLogOptionsSchema,
GetOneLogResponseSchema,
ExportResponseOptionsSchema,
ExportResponseOutputSchema,
JoinedRequestPathSchema,
} from 'deepcrawl/schemas';Metrics Schemas
import {
MetricsOptionsSchema,
MetricsSchema,
} from 'deepcrawl/schemas';Service Schemas
import {
CacheOptionsSchema,
LinkExtractionOptionsSchema,
MarkdownConverterOptionsSchema,
MetadataOptionsSchema,
PageMetadataSchema,
ScrapeOptionsSchema,
ScrapedDataSchema,
} from 'deepcrawl/schemas';