Version 1
GET /api/v1/emojis
Retrieve the list of custom emojis used in nonsense entries. This is meant to be used as a reference. 
GET /api/v1/variables
Retrieve the list of variables used in nonsense entries.
GET /api/v1/nonsense/random
Retrieve a random nonsense entry as JSON.
An entry that contains variables will be replaced by the server, except for $AUTHOR$, $SERVER$, $CHANNEL$, and ${app_name}. Refer to the Entry Formatting page for those variable definitions to be implemented in the client.
If an entry contains variables, there will be original_nonsense inside the JSON response that includes the raw entry text without the server replacing the variables. This is useful as a reference.
GET /api/v1/nonsense
Retrieve the nonsense database as a CSV1, JSON, or TXT2 file.
An entry that contains variables will be replaced by the server, except for $AUTHOR$, $SERVER$, $CHANNEL$, and ${app_name}. Refer to the Entry Formatting page for those variable definitions to be implemented on the client.
If an entry contains variables, there will be original_nonsense inside the JSON response that includes the raw entry text without the server replacing the variables. This is useful as a reference.
You may append these parameters at the end of the URL:
q=query— Restrict entries in the database export matching a search term.format=format— Export the database as acsv1,json, ortxt2 file.after=timestamp— Only export entries after a specified Unix timestamp.before=timestamp— Only export entries before a specified Unix timestamp.
Examples:
- Export the nonsense database containing the word “entry”:
/api/v1/nonsense?q=entry - Export the nonsense database as a plain text file:
/api/v1/nonsense?format=txt - Export the nonsense database as a JSON file that contains the word “red” since 1609718400 up until 1643032654:
/api/v1/nonsense?format=json&q=red&after=1609718400&before=1643032654
GET /api/v1/nonsense/:uuid
Retrieve a specific nonsense entry as JSON by its UUID.
GET /api/v1/nonsense/:uuid.png
Retrieve a share image of a specific nonsense entry by its UUID. Note that PNG is the only supported format for now.
GET /api/v1/nonsense/status
Retrieve the status of the nonsense database. This is useful when the client is caching the database for offline use. In that case, the client can compare the cache with the online database based on the timestamp of the latest entry.
POST /api/v1/nonsense/report
Report a nonsense entry by its UUID with a valid reason:
| Value | Description |
|---|---|
hate_speech |
Slurs or hate speech |
sexual_content |
Explicit sexual content |
graphic_violence |
Graphic violence |
personal_information |
Private or personally identifiable information |
duplicate |
Same or near-identical entry already exists |
other |
Other violation (use details to elaborate) |
…along with optional details text.
POST to the reporting endpoint with the following JSON structure:
{
"entryUuid": "00000000-0000-0000-0000-000000000000",
"reason": "other",
"details": "Optional additional context"
}Replace entryUuid, reason, and details with actual reporting data. entryUuid must be an existing UUID of a nonsense entry.
EXPERIMENTAL: OData backend
This is experimental and may be removed in the future.
The (minimal) OData endpoints only exist to be used in data visualization software such as Tableau, like this dashboard for example.
/odata/v2/$metadata
Retrieve the metadata about the columns that are in the database with each of their own types.
/odata/v2/nonsense_list
Retrieve the database as Atom via OData v2. You can append ?all=true at the end of the URL to retrieve the full database.
Who’s using Nontrinsic?
- The original founder of the nonsense database, Artifyber, uses an export of the nonsense database from Nontrinsic in her website’s nonsense ticker: https://artifyber.xyz/e/nansenz
- Bricked has made a nonsense generator from the nonsense database using Markov chains: https://codeberg.org/bricked/nonsense-generator
- Maxy developed these new versions of NonsenseBot, this time using the API with the Python wrapper for Nontrinsic:
- Discord: https://codeberg.org/nontrinsic/discord
- Fediverse: https://codeberg.org/nontrinsic/fedi