Skip to main content

scrapfly_sdk/result/
extraction.rs

1//! Extraction result — port of `ExtractionResult` in `sdk/go/result_scrape.go`.
2
3use serde::Deserialize;
4
5/// Response envelope from `POST /extraction`.
6#[derive(Debug, Clone, Deserialize, Default)]
7pub struct ExtractionResult {
8    /// Extracted data (shape depends on the template/prompt).
9    #[serde(default)]
10    pub data: serde_json::Value,
11    /// Content type of the input document.
12    #[serde(default)]
13    pub content_type: String,
14    /// Quality/confidence marker (shape depends on the model).
15    #[serde(default)]
16    pub data_quality: serde_json::Value,
17}