Options and configuration

Options and configuration

Pass an ExtractOptions or SchemaOptions instance for readable request controls. You may also pass a mapping with the wire keys shown below.

Extract options

from makra import ExtractOptions, ProxyRegion, ValidationModes

options = ExtractOptions(
    validation_mode=ValidationModes.OBSERVE,
    additional_pages=2,
    pagination_enabled=True,
    title_enabled=True,
    post_ready_wait_ms=1500,
    proxy_region=ProxyRegion.country("DE"),
    recovery_retry=True,
    recovery_retry_delay_ms=2000,
)
Field Type Meaning
validation_mode observe, repair, or None Report findings only or permit correction
additional_pages Non-negative integer or None Number of follow pages
pagination_enabled Boolean or None Explicit pagination switch
title_enabled Boolean or None Request generated run title behavior
post_ready_wait_ms Integer from 0 through 120000 Extra wait after page readiness
proxy_region ProxyRegion or None Egress region request
recovery_retry Boolean or None Enable one crawler recovery retry
recovery_retry_delay_ms Integer from 0 through 300000 Delay before recovery retry

Setting additional_pages without pagination_enabled enables pagination. A value of zero remains an explicit enabled request with no follow pages.

Schema options

SchemaOptions accepts the shared crawler fields only.

from makra import ProxyRegion, SchemaOptions

options = SchemaOptions(
    post_ready_wait_ms=1000,
    proxy_region=ProxyRegion.continent("europe"),
    recovery_retry=True,
)

Proxy regions

Use ProxyRegion.worldwide(), ProxyRegion.continent(value), or ProxyRegion.country(value). Country values are ISO 3166-1 alpha-2 codes and are normalized to uppercase. Continent values are africa, asia, europe, north.america, oceania, and south.america.

Regional routing changes where the request exits. It does not bypass access controls or guarantee localized content.

Mapping form

config = {
    "validation_mode": "observe",
    "pagination": {"enabled": True, "additional_pages": 2},
    "title": {"enabled": True},
    "crawler": {
        "post_ready_wait_ms": 1500,
        "proxy": {
            "region": {"scope": "country", "value": "DE"},
        },
        "recovery": {"retry": True, "retry_delay_ms": 2000},
    },
}

The SDK translates recovery keys to the API's wire names. Public config keys removed from the SDK, including memory, selector_chain_version, and extract-level audit, raise ValueError.

Use Client reference for where each options type is accepted.