web-query-parse Edge Function — Web Search
Web SearchParse a URL query string into a typed object with support for arrays, number/boolean coercion, and bracket notation.
Edge function web-query-parse Parse a URL query string into a typed object with support for arrays, number/boolean coercion, and bracket notation.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.
npx aerostack add navin/web-query-parse Use with AI Assistants
MCPConnect Claude, Cursor, or any MCP-compatible client — then call this function by slug
① Add MCP Server
Add this once — access all Aerostack functions from your AI tool.
{
"mcpServers": {
"aerostack": {
"url": "https://mcp.aerostack.dev",
"type": "http"
}
}
} ② Call this function
Ask your AI to use the call_function tool with this slug:
call_function({
slug: "web-query-parse",
args: {
"query": "example_query",
"options": null
}
}) web-query-parse — Parse a query string to an object
Convert a raw URL query string into a structured object with optional type coercion and array format support.
API
POST /api/web-query-parse
Request body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string | Yes | — | Query string (with or without leading ?) |
options.decode |
boolean | No | true | URL-decode values |
options.parseNumbers |
boolean | No | false | Coerce numeric strings to numbers |
options.parseBooleans |
boolean | No | false | Coerce 'true'/'false' to booleans |
options.arrayFormat |
'repeat'|'bracket'|'comma' |
No | 'repeat' |
Array key format |
Success response (200)
{
"success": true,
"data": {
"params": { "tag": ["a", "b"], "page": "1" },
"count": 2
}
}
Error responses
| Code | HTTP | When |
|---|---|---|
INVALID_INPUT |
400 | Missing query field |
INTERNAL_ERROR |
500 | Unexpected error |
Usage
Direct import
import { webQueryParse } from '@aerostack/functions/web-query-parse';
const result = webQueryParse({
query: '?tag=js&tag=ts&page=2',
options: { parseNumbers: true },
});
// { params: { tag: ['js', 'ts'], page: 2 }, count: 2 }
Use Cases
- Parsing query strings from incoming request URLs in middleware
- Extracting filter parameters from paginated list APIs
- Reconstructing state from shareable URL parameters
Metadata
Tags
Publisher
@navin verified
Build and publish your own functions
Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.
More Web Search Functions
Browse Web Search Functions →web-query-stringify
by @navin
Serialize a parameters object to a URL query string with support for arrays, encoding, and null skipping.
web-content-type-parse
by @navin
Parse a Content-Type header value into MIME type, subtype, charset, boundary, and convenience boolean flags.
web-headers-parse
by @navin
Parse a raw HTTP header block string or object into a structured lowercase-keyed object with content-type and authorization extraction.
web-ip-extract
by @navin
Extract the real client IP address from HTTP request headers, with proxy trust control and private IP detection.
web-url-build
by @navin
Build a URL from a base and optional path, query parameters, and hash fragment.
web-url-parse
by @navin
Parse a URL into structured parts including protocol, host, pathname, query object, and hash.
Frequently asked questions
What does the web-query-parse function do? +
web-query-parse is a serverless edge function for web-search automation written in aerostack. Deploy it to Cloudflare Workers via your Aerostack workspace.
How do I deploy the web-query-parse function? +
Install the Aerostack CLI and run: ```bash aerostack deploy function @navin/web-query-parse ``` It will be live on Cloudflare Workers in seconds.
What runtime does web-query-parse use? +
web-query-parse runs on aerostack on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.
Can I customise the web-query-parse function? +
Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.