Frequently Asked Question

Words - generate a number of words within limits
Last Updated 13 days ago

Words API

Overview

Words returns a number of English words that match certain size constraints and is very useful for generating random passwords or challenges. 

The source data is 260k

Version

1.001

Endpoint

/v2/words

Authentication

This API requires authentication using an API key. The key should be passed in the X_API_Key header.

Request Parameters

Parameter Type Description

c

string The number of words to return
minintThe minimum number of letters (optional)
maxintThe maximum number of letters (optional)

Response

The API returns a JSON object with the following structure:

Field Type Description
status string "ok" if successful, or an error message
words array Your words

Example Response (Success)


{
  "status":"ok",
  "words":["deric","limacel","indult"]
}

Example Response (Not Found)


{
  "status":"unable to find words",
  "count":3,
  "min":30,
  "max":40
}

Error Handling

  • If no count is provided:  "status": "Required Parameter" 
  • If we can't find enough words : "status": "unable to find words" 
  • If there's an authentication error:  "status": "[validation status]" 

Notes

  • The API validates count, and sizes.
  • The Randomisation is not perfect, but good enough

Security

  • Ensure that the API key is kept secure and not exposed in client-side code.
  • All responses are sent with the "Content-Type: application/json" header.
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...