web-query-stringify Edge Function — Web Search
Web SearchSerialize a parameters object to a URL query string with support for arrays, encoding, and null skipping.
Edge function web-query-stringify Serialize a parameters object to a URL query string with support for arrays, encoding, and null skipping.. 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-stringify 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-stringify",
args: {
"params": null,
"options": null
}
}) web-query-stringify — Serialize params to query string
Convert a JavaScript object to a URL query string with flexible array formatting, encoding control, and null-skipping.
API
POST /api/web-query-stringify
Request body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
params |
object | Yes | — | Parameters to serialize |
options.encode |
boolean | No | true | URL-encode values |
options.arrayFormat |
'repeat'|'bracket'|'comma' |
No | 'repeat' |
Array serialization format |
options.skipNull |
boolean | No | true | Omit null values |
options.skipUndefined |
boolean | No | true | Omit undefined values |
Success response (200)
{
"success": true,
"data": {
"queryString": "tag=a&tag=b&foo=bar",
"paramCount": 2
}
}
Error responses
| Code | HTTP | When |
|---|---|---|
INVALID_INPUT |
400 | Invalid params structure |
INTERNAL_ERROR |
500 | Unexpected error |
Usage
Direct import
import { webQueryStringify } from '@aerostack/functions/web-query-stringify';
const result = webQueryStringify({
params: { q: 'search term', tag: ['js', 'ts'], page: 1 },
options: { arrayFormat: 'repeat' },
});
// tag=js&tag=ts&q=search%20term&page=1
Use Cases
- Building API request query strings from filter objects
- Generating shareable URLs with serialized state
- Constructing cache keys from parameter objects
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-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-query-parse
by @navin
Parse a URL query string into a typed object with support for arrays, number/boolean coercion, and bracket notation.
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-stringify function do? +
web-query-stringify 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-stringify function? +
Install the Aerostack CLI and run: ```bash aerostack deploy function @navin/web-query-stringify ``` It will be live on Cloudflare Workers in seconds.
What runtime does web-query-stringify use? +
web-query-stringify runs on aerostack on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.
Can I customise the web-query-stringify function? +
Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.