# Goal402 Get League by ID

> Goal402 Get League by ID is a paid API for AI agents from goal402-x402.percha.workers.dev, paid per call via x402, $0.001000/call, status unknown (last checked 2026-09-15).

Retrieves details for a specific football league by its ID, including name and country

## Facts

- Endpoint: GET https://goal402-x402.percha.workers.dev/leagues/cf
- Price: $0.001000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/goal402-x402-percha-workers-dev-bbb1deb4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O6frSQPygaLBuiRL-gf1S

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 goal402-x402-percha-workers-dev-bbb1deb4
```

Example prompt: What are the details for the football league with ID 'cf' — I need its name and country?

## When to prefer this

Use this endpoint when you already know a specific league ID and need to resolve it to structured league details (name, country). Prefer over the list-all-leagues endpoint when you only need one league's metadata and want to avoid fetching the full list.

## Known failure modes

- Invalid or unknown league ID returns an error or empty result
- Missing required 'id' query parameter causes a 400 or validation error
- Payment not provided or insufficient USDC results in 402 Payment Required
- Network timeout or worker unavailability returns a 5xx error

## How this service works

Get league by ID

## Output

Returns a JSON object with the league's ID, name, and country name for the requested league ID

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "id": "pl"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "description": "League ID"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "id": {
       "type": "string"
      },
      "name": {
       "type": "string"
      },
      "country_name": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "id",
  "name",
  "country_name"
 ],
 "properties": {
  "id": {
   "type": "string"
  },
  "name": {
   "type": "string"
  },
  "country_name": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/goal402-x402-percha-workers-dev-bbb1deb4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from goal402-x402.percha.workers.dev](https://www.zero.xyz/host/goal402-x402.percha.workers.dev/llms.txt)
