data_for_seo/entity/serp/youtube/video_comments.rs
1use serde::{Deserialize, Serialize};
2
3/// YouTube video-comments advanced result object.
4/// See <https://docs.dataforseo.com/v3/serp/youtube/video_comments/task_get/advanced/>.
5#[derive(Debug, Default, Serialize, Deserialize, Clone)]
6pub struct SerpApiYoutubeVideoCommentsTaskAdvanced {
7 /// YouTube video identifier.
8 pub video_id: Option<String>,
9 /// Search-engine domain the results were taken from.
10 pub se_domain: Option<String>,
11 /// Title of the result.
12 pub title: Option<String>,
13 /// Direct URL to reproduce the search on the search engine.
14 pub check_url: Option<String>,
15 /// UTC timestamp when the result was received.
16 pub datetime: Option<String>,
17 /// Total number of comments on the video.
18 pub comments_count: Option<i64>,
19 /// Number of items returned in this result.
20 pub items_count: Option<i64>,
21 /// Parsed elements of the result.
22 pub items: Option<Vec<SerpApiElementYoutubeComment>>,
23}
24
25/// `youtube_comment` item: a single top-level comment.
26#[derive(Debug, Default, Serialize, Deserialize, Clone)]
27pub struct SerpApiElementYoutubeComment {
28 /// Element type as reported by the DataForSEO API.
29 #[serde(rename = "type")]
30 pub type_of_element: Option<String>,
31 /// Rank of the element among elements of the same type.
32 pub rank_group: Option<i64>,
33 /// Absolute rank of the element across the whole SERP.
34 pub rank_absolute: Option<i64>,
35 /// Display name of the comment author.
36 pub author_name: Option<String>,
37 /// URL of the author's avatar image.
38 pub author_thumbnail: Option<String>,
39 /// URL of the author's channel.
40 pub author_url: Option<String>,
41 /// Text content.
42 pub text: Option<String>,
43 /// Human-readable publication date.
44 pub publication_date: Option<String>,
45 /// UTC timestamp associated with the result.
46 pub timestamp: Option<String>,
47 /// Number of likes.
48 pub likes_count: Option<i64>,
49 /// Number of replies to the comment.
50 pub reply_count: Option<i64>,
51}