Skip to content

API block

Manuel Strehl edited this page Aug 2, 2013 · 5 revisions

Information about a Unicode Block

Template for this request:

http://codepoints.net/api/v1/block/{block}{?callback}

where {block} is the case-insensitive name of a Unicode block. Spaces and underscores can be used as liked. That means, Basic%20Latin, BasicLatin and Basic_Latin will all give the same result. {?callback} is an optional callback function name to perform a JSON-P request.

Response

A response looks like this:

    {
        "name": "Basic Latin",
        "first": "U+0000",
        "last": "U+007F",
        "next_block": "Latin-1 Supplement"
    }

Additional HTTP Headers

A successful response will contain three to four Link headers:

  1. rel=alternate links to the description page of the block on the main site.
  2. rel=up links to the API endpoint for the containing Unicode plane.
  3. rel=prev links to the previous block, if it exists.
  4. rel=next links to the next block, if it exists.

Possible Errors

  1. 404 Not Found: If the value for {block} is no recognized Unicode block.
Clone this wiki locally