Skip to main content

OnPageApiTaskPost

Struct OnPageApiTaskPost 

Source
pub struct OnPageApiTaskPost {
Show 43 fields pub target: String, pub max_crawl_pages: i32, pub start_url: Option<String>, pub force_sitewide_checks: Option<bool>, pub priority_urls: Option<Vec<String>>, pub max_crawl_depth: Option<i32>, pub crawl_delay: Option<i32>, pub store_raw_html: Option<bool>, pub enable_content_parsing: Option<bool>, pub support_cookies: Option<bool>, pub accept_language: Option<String>, pub custom_robots_txt: Option<String>, pub robots_txt_merge_mode: Option<String>, pub custom_user_agent: Option<String>, pub browser_preset: Option<String>, pub browser_screen_width: Option<i32>, pub browser_screen_height: Option<i32>, pub browser_screen_scale_factor: Option<f64>, pub respect_sitemap: Option<bool>, pub custom_sitemap: Option<String>, pub crawl_sitemap_only: Option<bool>, pub load_resources: Option<bool>, pub enable_www_redirect_check: Option<bool>, pub enable_javascript: Option<bool>, pub enable_xhr: Option<bool>, pub enable_browser_rendering: Option<bool>, pub disable_cookie_popup: Option<bool>, pub custom_js: Option<String>, pub validate_micromarkup: Option<bool>, pub allow_subdomains: Option<bool>, pub allowed_subdomains: Option<Vec<String>>, pub disallowed_subdomains: Option<Vec<String>>, pub check_spell: Option<bool>, pub check_spell_language: Option<String>, pub check_spell_exceptions: Option<Vec<String>>, pub calculate_keyword_density: Option<bool>, pub checks_threshold: Option<Value>, pub disable_sitewide_checks: Option<Vec<String>>, pub disable_page_checks: Option<Vec<String>>, pub switch_pool: Option<bool>, pub return_despite_timeout: Option<bool>, pub tag: Option<String>, pub pingback_url: Option<String>,
}
Expand description

Fields§

§target: String

Domain to crawl, without protocol or www (e.g. “example.com”).

§max_crawl_pages: i32

Maximum number of pages to crawl.

§start_url: Option<String>

First URL to crawl; defaults to the domain’s home page.

§force_sitewide_checks: Option<bool>

Run sitewide checks even when only a single page is crawled.

§priority_urls: Option<Vec<String>>

URLs to crawl before the rest of the site (max 20).

§max_crawl_depth: Option<i32>

Maximum crawl depth, counted in clicks from the start page.

§crawl_delay: Option<i32>

Delay between page requests, in milliseconds.

§store_raw_html: Option<bool>

Store the raw HTML of crawled pages for later retrieval.

§enable_content_parsing: Option<bool>

Parse page content so it can be retrieved via the content endpoints.

§support_cookies: Option<bool>

Accept cookies while crawling.

§accept_language: Option<String>

Value of the Accept-Language header sent while crawling.

§custom_robots_txt: Option<String>

Custom robots.txt content to apply during the crawl.

§robots_txt_merge_mode: Option<String>

How custom robots.txt combines with the site’s: “merge” or “override”.

§custom_user_agent: Option<String>

Custom User-Agent header sent while crawling.

§browser_preset: Option<String>

Device preset for rendering: “desktop”, “mobile”, or “tablet”.

§browser_screen_width: Option<i32>

Viewport width used for rendering, in pixels.

§browser_screen_height: Option<i32>

Viewport height used for rendering, in pixels.

§browser_screen_scale_factor: Option<f64>

Device pixel ratio used for rendering.

§respect_sitemap: Option<bool>

Crawl following the site’s XML sitemap.

§custom_sitemap: Option<String>

URL of a custom sitemap to crawl.

§crawl_sitemap_only: Option<bool>

Restrict the crawl to URLs listed in the sitemap.

§load_resources: Option<bool>

Load page resources (images, scripts, stylesheets) while crawling.

§enable_www_redirect_check: Option<bool>

Check whether the www and non-www versions redirect consistently.

§enable_javascript: Option<bool>

Execute page JavaScript while crawling (incurs extra cost).

§enable_xhr: Option<bool>

Allow XMLHttpRequest calls while rendering the page.

§enable_browser_rendering: Option<bool>

Emulate full browser rendering to measure Core Web Vitals.

§disable_cookie_popup: Option<bool>

Hide cookie-consent popups before capturing the page.

§custom_js: Option<String>

Custom JavaScript to execute on each crawled page.

§validate_micromarkup: Option<bool>

Validate structured microdata markup on crawled pages.

§allow_subdomains: Option<bool>

Crawl subdomains of the target domain.

§allowed_subdomains: Option<Vec<String>>

Subdomains to crawl (used when subdomains are otherwise excluded).

§disallowed_subdomains: Option<Vec<String>>

Subdomains to exclude from the crawl.

§check_spell: Option<bool>

Check spelling on crawled pages using the Hunspell library.

§check_spell_language: Option<String>

Hunspell language code used for spell checking.

§check_spell_exceptions: Option<Vec<String>>

Words to ignore during spell checking (max 1000).

§calculate_keyword_density: Option<bool>

Compute keyword density for crawled pages.

§checks_threshold: Option<Value>

Custom threshold values for the checks in OnPage responses.

§disable_sitewide_checks: Option<Vec<String>>

Sitewide checks to skip during the crawl.

§disable_page_checks: Option<Vec<String>>

Per-page checks to skip during the crawl.

§switch_pool: Option<bool>

Retry using a different proxy pool if the first attempt fails.

§return_despite_timeout: Option<bool>

Return partial results even if the crawl times out.

§tag: Option<String>

User-defined task identifier (max 255 characters).

§pingback_url: Option<String>

URL notified by GET when the task completes.

Implementations§

Source§

impl OnPageApiTaskPost

Source

pub fn new(target: String, max_crawl_pages: i32) -> Self

Creates a task request for target, crawling up to max_crawl_pages pages.

Trait Implementations§

Source§

impl Clone for OnPageApiTaskPost

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OnPageApiTaskPost

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OnPageApiTaskPost

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for OnPageApiTaskPost

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for OnPageApiTaskPost

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more