# Query Extractor
The web::Query extractor is used to process the URL query string. Actix Web integrates seamlessly with Serde to deserialize query parameters into typed structs.
#Handling Defaults and Options
Because web requests are unpredictable, missing query parameters can cause extraction to fail. To handle this gracefully, use Option<T> or implement Serde default values.
code_blocksrust
use serde::Deserialize;
#[derive(Deserialize)]
struct Pagination {
#[serde(default = "default_page")]
page: u32,
limit: Option<u32>,
}
fn default_page() -> u32 { 1 }If page is omitted from the URL, it will default to 1. If limit is omitted, it will be None.