# Layer 2 Solutions Side-by-Side Comparison

> Layer 2 Solutions Side-by-Side Comparison is a paid API for AI agents from api.web3identity.com, paid per call via x402, $0.010000/call, status unknown (last checked 2026-09-15).

Returns a side-by-side comparison of major Ethereum Layer 2 solutions including metrics, features, and network data

## Facts

- Endpoint: GET https://api.web3identity.com/api/l2/comparison
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-web3identity-com-31ac26e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hpLc4oZXa8UhND88RodAg

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 api-web3identity-com-31ac26e4
```

Example prompt: Give me a side-by-side comparison of the major Ethereum Layer 2 solutions — I want to see how Arbitrum, Optimism, zkSync, and Polygon stack up against each other on fees, speed, and key metrics.

## When to prefer this

Use this endpoint when an agent needs to present or reason over multiple Layer 2 solutions simultaneously for comparison purposes — especially when the user wants to evaluate trade-offs across networks rather than fetch data for a single specific L2.

## Known failure modes

- 402 Payment Required if x402 payment not included or insufficient
- 500 Internal Server Error if upstream data sources are unavailable
- Empty comparison array if no L2 data is currently indexed
- Stale data if underlying L2 metrics have not been recently updated

## How this service works

Side-by-side comparison of Layer 2 solutions

## Output

An array of Layer 2 protocol comparison objects, each containing network metrics, feature flags, pricing data, and other attributes useful for evaluating and contrasting different L2 scaling solutions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "comparison": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-web3identity-com-31ac26e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.web3identity.com](https://www.zero.xyz/host/api.web3identity.com/llms.txt)
