---
title: "Urn Resolve"
method: GET
path: "/api/urn/resolve"
tags: ["urn"]
---

# Urn Resolve

`GET /api/urn/resolve`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/urn/resolve`
- Auth: none declared

Parse a fojin URN and return its resolution target.

Returns 422 if the URN is syntactically invalid (parse error),
so clients distinguish "you sent bad input" from "I can't find
the referenced work". A valid-but-unknown URN returns 200 with
exists=false rather than 404 so external tools can detect the
miss without parsing an error body.

## Query parameters

- `urn` string, required: fojin URN, e.g. `fojin:cbeta/T0001.1#p0001a01`. **Anchor (the part after `#`) must be URL-encoded as `%23` in HTTP clients**, otherwise the browser or curl will treat `#` as a fragment delimiter and strip everything after it before sending the request — the server then sees an anchor-less URN and silently returns `anchor: null`. Example (anchor preserved): `/api/urn/resolve?urn=fojin:cbeta/T0001.1%23p0001a01`

## Response `200`

Successful Response

- URNResolveResponse
  - `urn` string, required
  - `scheme` string, required
  - `work_id` string, required
  - `juan` integer, nullable
  - `anchor` string, nullable
  - `text_id` integer, nullable
  - `reader_url` string, nullable
  - `reader_url_absolute` string, nullable
  - `exists` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
