Aerostack
search

web-query-stringify Edge Function — Web Search

Web Search

Serialize a parameters object to a URL query string with support for arrays, encoding, and null skipping.

navin @navin verified
Updated Mar 12, 2026
GitHub

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.

terminal — aerostack cli
$ npx aerostack add navin/web-query-stringify
smart_toy

Use with AI Assistants

MCP

Connect 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.

claude_desktop_config.json
{
  "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
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

upgrade Version 1.0.0
gavel License MIT
language Language typescript
cloud Provider aerostack

Tags

web
deployed_code

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 →

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.