# agent402.tools Query String Parser/Builder

> agent402.tools Query String Parser/Builder is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Parses a URL query string into a structured object, or serializes an object into a URL query string, depending on mode.

## Facts

- Endpoint: POST https://agent402.tools/api/querystring
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-query-string-parser-builder-bb2211a2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nOlWaq49DfSrjuIBKw8Fs

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 agent402-tools-query-string-parser-builder-bb2211a2 -d '<json body>'
```

Example prompt: Parse this URL query string into an object: 'name=John&age=30&city=New+York'. Use parse mode.

## When to prefer this

Use this endpoint when you need a simple, paid micro-service to parse or serialize URL query strings without writing custom parsing logic, especially in agent pipelines where you pay per call via x402 USDC micropayments.

## Known failure modes

- Invalid or malformed query string may return an error or empty object
- Missing 'value' field returns an error
- Unsupported mode value returns an error
- Deeply nested objects may not serialize correctly in build mode

## How this service works

Parse a URL query string into an object, or build one from an object. mode: parse (default) | build.

## Output

In parse mode, returns a structured key-value object representing each query parameter. In build mode, returns a properly encoded URL query string from the provided object.

## Example request

```json
{
 "mode": "parse",
 "value": "name=John&age=30&city=New+York"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "type": "string",
   "description": "parse | build"
  },
  "value": {
   "description": "String to parse or object to build"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-query-string-parser-builder-bb2211a2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
