# Delx Commerce — Slug From URL

> Delx Commerce — Slug From URL is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Extracts a URL slug (the last meaningful path segment) from a given URL string without fetching the destination

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/slug-from-url?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-slug-from-url-41208a72
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0TLZD0gSCX7LSqHj2SiXK

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 delx-commerce-slug-from-url-41208a72 -d '<json body>'
```

Example prompt: Can you extract the slug from this URL for me: https://example.com/docs/getting-started?ref=home — I just need the slug part, not the full path.

## When to prefer this

Choose this endpoint when you need a quick, cheap ($0.001 USDC), no-signup slug extraction from a URL string without any network fetch to the destination. It is ideal for agents processing large volumes of URLs locally where you only need the slug component and do not want side effects. Prefer it over regex-based DIY parsing when you want a consistent, schema-versioned result you can verify on-chain via x402.

## Known failure modes

- Invalid or malformed URL input returns an error — the URL must be a valid URI format
- Missing 'url' field in request body causes a validation error
- URLs with no meaningful path segment (e.g. bare domain) may return an empty or root slug
- Payment failure or insufficient USDC balance via x402 prevents the call from completing

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object containing the extracted slug (e.g. 'getting-started'), the full path segment (e.g. '/docs/getting-started'), and a schema identifier ('delx/slug-from-url/v1'). The destination URL is never fetched or validated — parsing is done locally on the provided string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "URL to parse locally. Delx never fetches or validates the destination."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/docs/getting-started",
  "slug": "getting-started",
  "schema": "delx/slug-from-url/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-slug-from-url-41208a72/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
