Skip to main content

data_for_seo/entity/serp/element/
knowledge_graph.rs

1use crate::entity::SerpApiRectangle;
2use crate::entity::serp::element::hotels_pack_element::SerpApiElementHotelsPackElement;
3use serde::{Deserialize, Serialize};
4
5/// KnowledgeGraph
6#[derive(Debug, Serialize, Deserialize, Clone)]
7pub struct SerpApiElementKnowledgeGraph {
8    /// Rank of the element among elements of the same type.
9    pub rank_group: Option<i64>,
10    /// Absolute rank of the element across the whole SERP.
11    pub rank_absolute: Option<i64>,
12    /// Alignment of the element within the SERP, `left` or `right`.
13    pub position: Option<String>,
14    /// XPath of the element within the page.
15    pub xpath: Option<String>,
16    /// Title of the result.
17    pub title: Option<String>,
18    /// Subtitle text of the result.
19    pub subtitle: Option<String>,
20    /// Snippet / description text of the result.
21    pub description: Option<String>,
22    /// Identifier of the knowledge-graph card.
23    pub card_id: Option<String>,
24    /// URL of the result.
25    pub url: Option<String>,
26    /// URL of the image.
27    pub image_url: Option<String>,
28    /// URL of the logo image.
29    pub logo_url: Option<String>,
30    /// Google CID identifier of the entity.
31    pub cid: Option<String>,
32    /// Parsed elements of the result.
33    pub items: Option<Vec<SerpApiElementHotelsPackElement>>,
34    /// Pixel bounding box of the element (when `calculate_rectangles` is set).
35    pub rectangle: Option<SerpApiRectangle>,
36}