# Query String Parser API

> Query String Parser API is a paid API for AI agents from agent-utility-network.frosty-sound-4560.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Parses a URL query string into structured key-value pairs, returning both a values map and ordered entries array.

## Facts

- Endpoint: POST https://agent-utility-network.frosty-sound-4560.workers.dev/v1/paid/querystring-parse
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/query-string-parser-api-eb3ad6dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r7plPyMapVpLat0m3vgsv

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability query-string-parser-api-eb3ad6dc -d '<json body>'
```

Example prompt: Can you parse this query string for me — 'a=1&a=2&b=hello' — and give me back all the key-value pairs in a structured format?

## When to prefer this

Use this endpoint when you need reliable, structured parsing of URL query strings — especially when handling repeated keys (e.g. a=1&a=2) that naive string-splitting would mishandle. Prefer it over custom regex or split-based parsing when correctness and multi-value support matter. It is well-suited for AI agent workflows that process redirect URLs, form submissions, or API callback parameters programmatically.

## Known failure modes

- Malformed or excessively long query string (over 32768 chars) may return an error
- Payment failure via x402 if USDC balance is insufficient
- Empty query string returns empty values map and entries array
- Network timeout if the Cloudflare Worker is under load

## How this service works

Quality-scored paid utility APIs for AI agents over x402 on Base USDC.

## Output

Returns a JSON object with two fields: 'values' (a map of each parameter key to an array of its string values, supporting repeated keys) and 'entries' (an ordered array of [key, value] pairs preserving the original sequence).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "maxLength": 32768
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "values": {
    "a": [
     "1",
     "2"
    ],
    "b": [
     "hello"
    ]
   },
   "entries": [
    [
     "a",
     "1"
    ],
    [
     "a",
     "2"
    ],
    [
     "b",
     "hello"
    ]
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/query-string-parser-api-eb3ad6dc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-utility-network.frosty-sound-4560.workers.dev](https://www.zero.xyz/host/agent-utility-network.frosty-sound-4560.workers.dev/llms.txt)
