Scale Intelligence■ Docs
Docs / The model / ExtractionTemplate

ExtractionTemplate.

The scraping framework's unit: what a page kind looks like, how far to walk, how to render and navigate, what to extract, how each field is normalised, what makes a row the same row, which source object and mapping the rows become, under which policies, proved by recorded samples

Figure 1ExtractionTemplatespecified
EXTRACTIONTEMPLATEdefinition at follows scopenametextpage_kindenum:listing|detail|feed|table|s…maps onto spider-rs's configurationscopeCrawlScoperenderenum:static|auto|renderedrun on CloakBrowser before extraction: open, click, type, scroll, wait, paginatenavigation[BrowsingStep]fields[FieldSpec]for the model-assisted reader, every value with its evidence spanschemajsonoptionalnormalisation[NormalisationRule]the fields that make one row the same row across readsdedup_key[text]source_objectSourceObjectmappingMappingoptionalfilterResourceFilterCRAWLSCOPEthrough scopeBROWSINGSTEPthrough navigationFIELDSPECthrough fieldsNORMALISATIONRULEthrough normalisationSOURCEOBJECTthrough source_objectMAPPINGthrough mappingand 9 more fields on this page
ExtractionTemplate is a definition at follows scope. The drawing shows its fields and the objects that they point at.
kind
definition
scope
follows
key
its name and version, a tenant’s or the platform’s
store
postgres
family
sources

Fields#

fieldtyperequirednote
nametextyes
page_kindone of listing | detail | feed | table | search results | infinite scroll | document | API responseyes
scopeCrawlScopeyesmaps onto spider-rs’s configuration
renderone of static | auto | renderedyes
navigationBrowsingStepyesrun on CloakBrowser before extraction: open, click, type, scroll, wait, paginate
fieldsFieldSpecyes
schemajsonnofor the model-assisted reader, every value with its evidence span
normalisationNormalisationRuleyes
dedup_key[text]yesthe fields that make one row the same row across reads
source_objectSourceObjectyes
mappingMappingno
filterResourceFilteryes
identity_neededtextno
proxy_policyProxyPolicyno
freshnessdurationyeshow long a read stays good; a re-read before it is a read of bronze
attempt_caps{text:count}yesby failure class
budget{text:count}yespages, bytes, money
copied_fromidnothe platform original a tenant copied
samples_hashhashnothe recorded pages and their expected rows
stateReadinessyesready only when the samples check passes
kind_of_entityKindOfEntitynothe kind of entity a page of this template shows first

Routes that use it#