For developers

All character data on this site is available as JSON. It is free, read-only and keyless. Search by name or by codepoint to return character, Unicode name and codepoint, category, a link to its page here, and a short usage note.

The endpoint

GET https://api.textcharacter.com/api/v1/query

The version root, GET /api/v1, answers with a short usage note and the current rate limit, so a cold request is never a 404.

Parameters

ParameterWhat it does
q requiredThe search term — a name, part of a name, or a codepoint. Between 2 and 100 characters. Missing, empty or too short and the response is a 400 carrying an error and a usage line.
limit optionalHow many results to return. Defaults to 25, capped at 100. Asking for more is capped rather than refused; the limit field in the response tells you what was applied.

Rate limit, CORS, errors

  • 60 requests per 60 seconds, per IP. Over that the response is a 429 with a Retry-After header and a matching retryAfter field in the body.
  • CORS is open — every /api/v1 response carries Access-Control-Allow-Origin: *, so browser code can call it directly. GET only.
  • Errors are JSON: a string plus the usage line, under the matching status code.

Example

curl "https://api.textcharacter.com/api/v1/query?q=em+dash&limit=3"

The response:

{
  "query": "em dash",
  "count": 3,
  "total": 5,
  "limit": 3,
  "results": [
    {
      "char": "—",
      "name": "Em Dash",
      "codepoint": "U+2014",
      "url": "https://www.textcharacter.com/em-dash-2014",
      "category": "punctuation-dashes",
      "usage": "The widest ordinary dash, and the one English writers get attached to — it opens a sentence up for an aside, marks an abrupt turn, or lands a final clause harder than a comma would. Unicode's code…"
    },
    {
      "char": "︱",
      "name": "Presentation Form For Vertical Em Dash Glyph For Vertical Em Dash",
      "codepoint": "U+FE31",
      "url": "https://www.textcharacter.com/presentation-form-for-vertical-em-dash-glyph-for-vertical-em-dash-fe31",
      "category": "pd",
      "usage": null
    },
    {
      "char": "﹘",
      "name": "Small Em Dash",
      "codepoint": "U+FE58",
      "url": "https://www.textcharacter.com/small-em-dash-fe58",
      "category": "pd",
      "usage": null
    }
  ]
}

Fields

query
The search term as the API read it, trimmed.
count
How many results this response carries.
total
How many characters matched in total, ignoring the limit.
limit
The page size actually applied.
results[].char
The character itself.
results[].name
Its Unicode name.
results[].codepoint
The U+XXXX form; space-separated for multi-codepoint sequences.
results[].url
The character’s page on this site.
results[].category
Its primary category slug — a curated one where it has one, otherwise the raw Unicode bucket. null if it has none.
results[].usage
A ~200-character excerpt of what we have written about the character, or null when nothing has been written yet.