Skip to main content

data_for_seo/entity/serp/element/
mod.rs

1mod about_this_result_element;
2mod ads_advertiser;
3mod ads_domain;
4mod ads_multi_account_advertiser;
5mod ads_search;
6mod advertiser;
7mod ai_overview;
8mod ai_overview_element;
9mod ai_overview_reference;
10mod answer_box;
11mod carousel;
12mod carousel_element;
13mod compare_sites;
14mod compare_sites_element;
15mod discussions_and_forums;
16mod discussions_and_forums_element;
17mod faq_box;
18mod faq_box_element;
19mod featured_snippet;
20mod hotels_pack;
21mod hotels_pack_element;
22mod images_element;
23mod knowledge_graph;
24mod knowledge_graph_ai_overview_item;
25mod knowledge_graph_images_element;
26mod knowledge_graph_images_item;
27mod link_element;
28mod local_pack;
29mod map_search;
30mod multi_carousel;
31mod multi_carousel_element;
32mod multi_carousel_snippet;
33mod organic;
34mod paid;
35mod people_also_ask;
36mod people_also_ask_element;
37mod people_also_ask_extended_element;
38mod people_also_search;
39mod refinement_chips;
40mod refinement_chips_element;
41mod refinement_chips_option;
42mod related_result;
43mod related_searches;
44
45pub use about_this_result_element::*;
46pub use ads_advertiser::*;
47pub use answer_box::*;
48// pub use app::*;
49pub use ads_domain::*;
50pub use ads_multi_account_advertiser::*;
51pub use ads_search::*;
52pub use advertiser::*;
53pub use ai_overview::*;
54pub use ai_overview_element::*;
55pub use ai_overview_reference::*;
56pub use carousel::*;
57pub use carousel_element::*;
58pub use compare_sites::*;
59pub use compare_sites_element::*;
60pub use discussions_and_forums::*;
61pub use discussions_and_forums_element::*;
62pub use faq_box::*;
63pub use faq_box_element::*;
64pub use featured_snippet::*;
65pub use hotels_pack::*;
66pub use images_element::*;
67pub use knowledge_graph::*;
68pub use knowledge_graph_ai_overview_item::*;
69pub use knowledge_graph_images_element::*;
70pub use knowledge_graph_images_item::*;
71pub use link_element::*;
72pub use local_pack::*;
73pub use map_search::*;
74pub use multi_carousel::*;
75pub use multi_carousel_element::*;
76pub use multi_carousel_snippet::*;
77pub use organic::*;
78pub use paid::*;
79pub use people_also_ask::*;
80pub use people_also_ask_element::*;
81pub use people_also_ask_extended_element::*;
82pub use people_also_search::*;
83pub use refinement_chips::*;
84pub use refinement_chips_element::*;
85pub use refinement_chips_option::*;
86pub use related_result::*;
87pub use related_searches::*;
88
89use crate::entity::{SerpApiElementTopStoriesElement, SerpApiRectangle};
90use serde::{Deserialize, Serialize};
91
92/// GoogleJobsItem
93#[derive(Debug, Serialize, Deserialize, Clone)]
94pub struct SerpApiElementGoogleNewsSearch {
95    /// Element type as reported by the DataForSEO API.
96    #[serde(rename = "type")]
97    pub type_of_element: Option<String>,
98    /// Rank of the element among elements of the same type.
99    pub rank_group: Option<i64>,
100    /// Absolute rank of the element across the whole SERP.
101    pub rank_absolute: Option<i64>,
102    /// XPath of the element within the page.
103    pub xpath: Option<String>,
104    /// Domain of the result.
105    pub domain: Option<String>,
106    /// Title of the result.
107    pub title: Option<String>,
108    /// URL of the result.
109    pub url: Option<String>,
110    /// URL of the image.
111    pub image_url: Option<String>,
112    /// Snippet text of the result.
113    pub snippet: Option<String>,
114    /// Time published.
115    pub time_published: Option<String>,
116    /// UTC timestamp associated with the result.
117    pub timestamp: Option<String>,
118    /// Pixel bounding box of the element (when `calculate_rectangles` is set).
119    pub rectangle: Option<SerpApiRectangle>,
120}
121/// TopStories
122#[derive(Debug, Serialize, Deserialize, Clone)]
123pub struct SerpApiGoogleOrganicItemTopStories {
124    /// Rank of the element among elements of the same type.
125    pub rank_group: Option<i64>,
126    /// Absolute rank of the element across the whole SERP.
127    pub rank_absolute: Option<i64>,
128    /// Alignment of the element within the SERP, `left` or `right`.
129    pub position: Option<String>,
130    /// XPath of the element within the page.
131    pub xpath: Option<String>,
132    /// Title of the result.
133    pub title: Option<String>,
134    /// Parsed elements of the result.
135    pub items: Option<SerpApiElementTopStoriesElement>,
136    /// Pixel bounding box of the element (when `calculate_rectangles` is set).
137    pub rectangle: Option<SerpApiRectangle>,
138}
139/// EventItem
140#[derive(Debug, Serialize, Deserialize, Clone)]
141pub struct SerpApiElementEventItem {
142    /// Element type as reported by the DataForSEO API.
143    #[serde(rename = "type")]
144    pub type_of_element: Option<String>,
145    /// Rank of the element among elements of the same type.
146    pub rank_group: Option<i64>,
147    /// Absolute rank of the element across the whole SERP.
148    pub rank_absolute: Option<i64>,
149    /// Alignment of the element within the SERP, `left` or `right`.
150    pub position: Option<String>,
151    /// XPath of the element within the page.
152    pub xpath: Option<String>,
153    /// Title of the result.
154    pub title: Option<String>,
155    /// Snippet / description text of the result.
156    pub description: Option<String>,
157    /// URL of the result.
158    pub url: Option<String>,
159    /// URL of the image.
160    pub image_url: Option<String>,
161    /// Dates the event takes place.
162    pub event_dates: Option<Vec<SerpApiElementEventItemEventDate>>,
163    /// Venue and location details of the event.
164    pub location_info: Option<SerpApiElementEventItemLocationInfo>,
165    /// Links to event information and tickets.
166    pub information_and_tickets: Option<Vec<SerpApiElementInformationAndTicketsElement>>,
167}
168/// EventItemEventDate
169#[derive(Debug, Serialize, Deserialize, Clone)]
170pub struct SerpApiElementEventItemEventDate {
171    /// Start date and time of the event.
172    pub start_datetime: Option<String>,
173    /// End date and time of the event.
174    pub end_datetime: Option<String>,
175    /// Event dates as displayed in the SERP.
176    pub displayed_dates: Option<String>,
177}
178/// EventItemLocationInfo
179#[derive(Debug, Serialize, Deserialize, Clone)]
180pub struct SerpApiElementEventItemLocationInfo {
181    /// Name of the entity.
182    pub name: Option<String>,
183    /// Postal address of the entity.
184    pub address: Option<String>,
185    /// URL of the result.
186    pub url: Option<String>,
187    /// Google CID identifier of the entity.
188    pub cid: Option<String>,
189    /// Google feature identifier of the entity.
190    pub feature_id: Option<String>,
191}
192/// information_and_tickets_element
193#[derive(Debug, Serialize, Deserialize, Clone)]
194pub struct SerpApiElementInformationAndTicketsElement {
195    /// Postal address of the entity.
196    #[serde(rename = "type")]
197    pub address: Option<String>,
198    /// Title of the result.
199    pub title: Option<String>,
200    /// Snippet / description text of the result.
201    pub description: Option<String>,
202    /// URL of the result.
203    pub url: Option<String>,
204    /// Domain of the result.
205    pub domain: Option<String>,
206}
207/// GoogleJobsItem
208#[derive(Debug, Serialize, Deserialize, Clone)]
209pub struct SerpApiElementGoogleJobsItem {
210    /// Element type as reported by the DataForSEO API.
211    #[serde(rename = "type")]
212    pub type_of_element: Option<String>,
213    /// Rank of the element among elements of the same type.
214    pub rank_group: Option<i64>,
215    /// Absolute rank of the element across the whole SERP.
216    pub rank_absolute: Option<i64>,
217    /// Alignment of the element within the SERP, `left` or `right`.
218    pub position: Option<String>,
219    /// XPath of the element within the page.
220    pub xpath: Option<String>,
221    /// Identifier of the job posting.
222    pub job_id: Option<String>,
223    /// Title of the result.
224    pub title: Option<String>,
225    /// Name of the employer.
226    pub employer_name: Option<String>,
227    /// URL of the employer.
228    pub employer_url: Option<String>,
229    /// URL of the employer's logo.
230    pub employer_image_url: Option<String>,
231    /// Location of the entity.
232    pub location: Option<String>,
233    /// Name of the source that published the result.
234    pub source_name: Option<String>,
235    /// URL of the source that published the result.
236    pub source_url: Option<String>,
237    /// Salary shown for the job.
238    pub salary: Option<String>,
239    /// Employment contract type.
240    pub contract_type: Option<String>,
241    /// UTC timestamp associated with the result.
242    pub timestamp: Option<String>,
243    /// Pixel bounding box of the element (when `calculate_rectangles` is set).
244    pub rectangle: Option<SerpApiRectangle>,
245}
246/// Autocomplete
247#[derive(Debug, Serialize, Deserialize, Clone)]
248pub struct SerpApiElementAutocomplete {
249    /// Element type as reported by the DataForSEO API.
250    #[serde(rename = "type")]
251    pub type_of_element: Option<String>,
252    /// Rank of the element among elements of the same type.
253    pub rank_group: Option<i64>,
254    /// Absolute rank of the element across the whole SERP.
255    pub rank_absolute: Option<i64>,
256    /// Relevance score of the suggestion.
257    pub relevance: Option<i64>,
258    /// Suggested search query.
259    pub suggestion: Option<String>,
260    /// Type of the autocomplete suggestion.
261    pub suggestion_type: Option<String>,
262    /// URL that runs the suggested query.
263    pub search_query_url: Option<String>,
264    /// URL of the thumbnail image.
265    pub thumbnail_url: Option<String>,
266    /// Substrings the search engine highlighted in the result.
267    pub highlighted: Option<Vec<String>>,
268}
269/// Dataset
270#[derive(Debug, Serialize, Deserialize, Clone)]
271pub struct SerpApiElementDataset {
272    /// Element type as reported by the DataForSEO API.
273    #[serde(rename = "type")]
274    pub type_of_element: Option<String>,
275    /// Rank of the element among elements of the same type.
276    pub rank_group: Option<i64>,
277    /// Absolute rank of the element across the whole SERP.
278    pub rank_absolute: Option<i64>,
279    /// Alignment of the element within the SERP, `left` or `right`.
280    pub position: Option<String>,
281    /// XPath of the element within the page.
282    pub xpath: Option<String>,
283    /// Google Dataset Search identifier.
284    pub dataset_id: Option<String>,
285    /// Title of the result.
286    pub title: Option<String>,
287    /// URL of the image.
288    pub image_url: Option<String>,
289    /// Number of scholarly citations.
290    pub scholarly_citations_count: Option<i64>,
291    /// URL listing scholarly articles.
292    pub scholarly_articles_url: Option<String>,
293    /// Unique identifier of the dataset.
294    pub unique_identifier: Option<String>,
295    /// Related article reference.
296    pub related_article: Option<String>,
297    /// Links associated with the result.
298    pub links: Option<Vec<SerpApiElementLinkElement>>,
299    /// Providers that publish the dataset.
300    pub dataset_providers: Option<Vec<SerpApiElementDatasetProvidersElement>>,
301    /// Available file formats of the dataset.
302    pub formats: Option<Vec<SerpApiElementFormatsElement>>,
303    /// Authors of the dataset.
304    pub authors: Option<Vec<SerpApiElementAuthorsElement>>,
305    /// Licenses the dataset is released under.
306    pub licenses: Option<Vec<SerpApiElementLicencesElement>>,
307    /// Date the dataset was last updated.
308    pub updated_date: Option<String>,
309    /// Geographic areas the dataset covers.
310    pub area_covered: Option<Vec<String>>,
311    /// Time period the dataset covers.
312    pub period_covered: Option<SerpApiElementDatasetPeriodCovered>,
313    /// Description of the dataset.
314    pub dataset_description: Option<SerpApiElementDatasetDescription>,
315}
316
317/// Dataset Period Covered SERP data model.
318#[derive(Debug, Serialize, Deserialize, Clone)]
319pub struct SerpApiElementDatasetPeriodCovered {
320    /// Start date of the period the dataset covers.
321    pub start_date: Option<String>,
322    /// End date of the period the dataset covers.
323    pub end_date: Option<String>,
324    /// Date range as displayed in the SERP.
325    pub displayed_date: Option<String>,
326}
327/// Dataset Description SERP data model.
328#[derive(Debug, Serialize, Deserialize, Clone)]
329pub struct SerpApiElementDatasetDescription {
330    /// Description text of the dataset.
331    pub text: Option<String>,
332    /// Links included in the description.
333    pub links: Option<Vec<SerpApiElementLinkElement>>,
334}
335
336/// Dataset Providers Element SERP data model.
337#[derive(Debug, Serialize, Deserialize, Clone)]
338pub struct SerpApiElementDatasetProvidersElement {
339    /// Element type as reported by the DataForSEO API.
340    #[serde(rename = "type")]
341    pub type_of_element: Option<String>,
342    /// Title of the result.
343    pub title: Option<String>,
344    /// URL of the result.
345    pub url: Option<String>,
346    /// Domain of the result.
347    pub domain: Option<String>,
348}
349/// Formats Element SERP data model.
350#[derive(Debug, Serialize, Deserialize, Clone)]
351pub struct SerpApiElementFormatsElement {
352    /// Element type as reported by the DataForSEO API.
353    #[serde(rename = "type")]
354    pub type_of_element: Option<String>,
355    /// Ad creative format.
356    pub format: Option<String>,
357    /// Size of the file.
358    pub size: Option<String>,
359}
360/// Authors Element SERP data model.
361#[derive(Debug, Serialize, Deserialize, Clone)]
362pub struct SerpApiElementAuthorsElement {
363    /// Element type as reported by the DataForSEO API.
364    #[serde(rename = "type")]
365    pub type_of_element: Option<String>,
366    /// Name of the entity.
367    pub name: Option<String>,
368    /// URL of the result.
369    pub url: Option<String>,
370    /// Domain of the result.
371    pub domain: Option<String>,
372}
373/// Licences Element SERP data model.
374#[derive(Debug, Serialize, Deserialize, Clone)]
375pub struct SerpApiElementLicencesElement {
376    /// Element type as reported by the DataForSEO API.
377    #[serde(rename = "type")]
378    pub type_of_element: Option<String>,
379    /// Title of the result.
380    pub title: Option<String>,
381    /// URL of the result.
382    pub url: Option<String>,
383    /// Domain of the result.
384    pub domain: Option<String>,
385}