Skip to content

API filter

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

Filter a String

e.g. , by Unicode version or only uppercase letters

Template for this request:

http://codepoints.net/api/v1/filter/{data}{?property*}{?callback}

where {data} is an UTF-8 encoded string and {?property} are Unicode properties to filter by. Properties can be negated by appending a ! like this:

?age=1.1&gc!=Nd

This request filters the {data} for all codepoints added in Unicode 1.1 and not having the general category (gc) “Decimal Number”.

Properties can appear more than once, but must then have a [] appended:

?age[]=1.1&age[]=2.0&gc![]=Nd&gc![]=No

{?callback} is an optional callback function name to perform a JSON-P request.

Response

The response is a JSON string filtered for codepoints matching the given criteria.

Possible Errors

  1. 414 Request URI too Long: When {data} exceeds the maximum length (1024 codepoints at the moment).
  2. 400 Bad Request: When an unknown property appears.
  3. 500 Server Error: When for some reason the SQL query for filtering fails. Please open a ticket in this case, so we can handle such an error.
Clone this wiki locally