Skip to main content

data_for_seo/entity/backlinks/element/
backlinks_domain_page.rs

1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4/// A single crawled page item returned by the Domain Pages endpoint.
5/// See <https://docs.dataforseo.com/v3/backlinks/domain_pages/live/>.
6#[derive(Debug, Default, Serialize, Deserialize, Clone)]
7pub struct BacklinksApiElementBacklinksDomainPage {
8    /// Element type identifier for this item.
9    #[serde(rename = "type")]
10    pub type_of_element: Option<String>,
11    /// Whether to consider only the main domain.
12    pub main_domain: Option<String>,
13    /// Referring domain name.
14    pub domain: Option<String>,
15    /// Top-level domain of the page.
16    pub tld: Option<String>,
17    /// URL of the page.
18    pub page: Option<String>,
19    /// IP address of the page.
20    pub ip: Option<String>,
21    /// Date and time the page was first crawled (UTC).
22    pub first_visited: Option<String>,
23    /// Date and time the page was visited before `fetch_time` (UTC).
24    pub prev_visited: Option<String>,
25    /// Date and time the page was last crawled (UTC).
26    pub fetch_time: Option<String>,
27    /// HTTP status code.
28    pub status_code: Option<i32>,
29    /// Value of the page's redirect `Location` header.
30    pub location: Option<String>,
31    /// Size of the page in bytes.
32    pub size: Option<i64>,
33    /// Encoded size of the page in bytes.
34    pub encoded_size: Option<i64>,
35    /// Content encoding of the page.
36    pub content_encoding: Option<String>,
37    /// Media type of the page content.
38    pub media_type: Option<String>,
39    /// Server software reported by the target.
40    pub server: Option<String>,
41    /// Metadata about the page (title, headings, links, technologies).
42    pub meta: Option<BacklinksApiElementBacklinksDomainPageMeta>,
43}
44/// Page metadata (title, headings, link counts, technologies) for a crawled page.
45#[derive(Debug, Default, Serialize, Deserialize, Clone)]
46pub struct BacklinksApiElementBacklinksDomainPageMeta {
47    /// Title of the page.
48    pub title: Option<String>,
49    /// Canonical URL declared by the page.
50    pub canonical: Option<String>,
51    /// Number of internal links on the target.
52    pub internal_links_count: Option<i64>,
53    /// Number of external links on the target.
54    pub external_links_count: Option<i64>,
55    /// Number of images on the page.
56    pub images_count: Option<i64>,
57    /// Number of words on the page.
58    pub words_count: Option<i64>,
59    /// Spam score of the page (0-100).
60    pub page_spam_score: Option<i64>,
61    /// Social media tags found on the page with their values.
62    pub social_media_tags: Option<HashMap<String, String>>,
63    /// First `h1` heading on the page.
64    pub h1: Option<String>,
65    /// First `h2` heading on the page.
66    pub h2: Option<String>,
67    /// First `h3` heading on the page.
68    pub h3: Option<String>,
69    /// Alt texts of images on the page.
70    pub images_alt: Option<Vec<String>>,
71    /// `powered-by` technologies declared by the page.
72    pub powered_by: Option<Vec<String>>,
73    /// Language of the page.
74    pub language: Option<String>,
75    /// Character set of the page.
76    pub charset: Option<String>,
77    /// Platform types detected for the target.
78    pub platform_type: Option<Vec<String>>,
79    /// Technologies detected on the page.
80    pub technologies: Option<Vec<BacklinksApiElementBacklinksDomainPageWebpageTechnologies>>,
81    /// Backlink summary metrics for the page.
82    pub page_summary: Option<Vec<BacklinksApiElementBacklinksDomainPagePageSummary>>,
83}
84/// Technologies detected on a crawled page.
85#[derive(Debug, Default, Serialize, Deserialize, Clone)]
86pub struct BacklinksApiElementBacklinksDomainPageWebpageTechnologies {
87    /// Content management system detected for the target.
88    pub cms: Option<String>,
89    /// Blog engine detected on the page.
90    pub blogs: Option<String>,
91    /// Web server technology detected on the page.
92    #[serde(rename = "web-server")]
93    pub web_servers: Option<String>,
94}
95/// Backlink summary metrics for a crawled page.
96#[derive(Debug, Default, Serialize, Deserialize, Clone)]
97pub struct BacklinksApiElementBacklinksDomainPagePageSummary {
98    /// Date and time the element was first found (UTC).
99    pub first_seen: Option<String>,
100    /// Date and time the element was last seen before being lost (UTC).
101    pub lost_date: Option<String>,
102    /// Rank of this element on the configured scale (0-1000 by default).
103    pub rank: Option<i64>,
104    /// Number of backlinks pointing to the target.
105    pub backlinks: Option<i64>,
106    /// Average spam score of the backlinks (0-100).
107    pub backlinks_spam_score: Option<i64>,
108    /// Number of broken backlinks.
109    pub broken_backlinks: Option<i64>,
110    /// Number of referring pages returning a 4xx/5xx status.
111    pub broken_pages: Option<i64>,
112    /// Number of referring domains pointing to the target.
113    pub referring_domains: Option<i64>,
114    /// Number of referring domains with at least one nofollow link.
115    pub referring_domains_nofollow: Option<i64>,
116    /// Number of referring main (root) domains.
117    pub referring_main_domains: Option<i64>,
118    /// Number of referring main domains with at least one nofollow link.
119    pub referring_main_domains_nofollow: Option<i64>,
120    /// Number of referring IP addresses.
121    pub referring_ips: Option<i64>,
122    /// Number of referring subnetworks.
123    pub referring_subnets: Option<i64>,
124    /// Number of referring pages pointing to the target.
125    pub referring_pages: Option<i64>,
126    /// Distribution of referring links by top-level domain with counts.
127    pub referring_links_tld: Option<HashMap<String, i64>>,
128    /// Distribution of referring link types (anchor, image, link, ...) with counts.
129    pub referring_links_types: Option<HashMap<String, i64>>,
130    /// Distribution of referring link attributes (nofollow, ugc, ...) with counts.
131    pub referring_links_attributes: Option<HashMap<String, i64>>,
132    /// Distribution of referring links by platform type with counts.
133    pub referring_links_platform_types: Option<HashMap<String, i64>>,
134    /// Distribution of referring links by HTML semantic location with counts.
135    pub referring_links_semantic_locations: Option<HashMap<String, i64>>,
136    /// Distribution of referring links by ISO country code with counts.
137    pub referring_links_countries: Option<HashMap<String, i64>>,
138    /// Number of referring pages with at least one nofollow link.
139    pub referring_pages_nofollow: Option<i64>,
140}