Insult API

Formats

FormatContent Type
txttext/plain
jsontext/json
htmltext/html

Languages

LibInsult provides a few different languages, note that different languages might have different default templates.

CodeDescription
enEnglish
en_corporateEnglish corporate jargon

Explore

You can play with the various parameters with the API Explorer.

Responses

In case of a successful request, the API will return a 200 page with the insult formatted in the requested format.

In case of incorrect parameters, the API will return a 400 error, the body of the response depends on the format.

JSON

A successful responses will contain the following data:

NameValue
errorfalse
insultThe generated string
argsA dictionary listing the parameters used to generate the output, including default values.

A failed response will have the following:

NameValue
errortrue
error_messageA brief message describing the reason for the error.

Methods

GET

/insult

Url: /api/insult

Generates an insult in plain text.

NameDescriptionDefault
langLanguageen
templateInsult templateNone
whoPerson to insult, changes the template to third person singular.None
pluralIf present (with who) changes the template to third person plural.None
Parameters

/insult.format

Url: /api/insult.html

Generates an insult in one of the supported formats.

NameDescriptionDefault
langLanguageen
templateInsult templateNone
whoPerson to insult, changes the template to third person singular.None
pluralIf present (with who) changes the template to third person plural.None
Parameters

/lang/insult.format

Url: /api/en/insult.html

Generates an insult in a fixed language.

NameDescriptionDefault
templateInsult templateNone
whoPerson to insult, changes the template to third person singular.None
pluralIf present (with who) changes the template to third person plural.None
Parameters

/adjective

Url: /api/adjective

Generates a single adjective in plain text.

NameDescriptionDefault
langLanguageen
Parameters

/adjective.format

Url: /api/adjective.html

Generates a single adjective in one of the supported formats.

NameDescriptionDefault
langLanguageen
Parameters

/lang/adjective.format

Url: /api/en/adjective.html

Generates a single adjective in a fixed language.