aid: numbers name: Numbers API description: >- Numbers API by David Hu and Mack Duan — a free, community-contributed HTTP API for interesting facts about numbers. Returns trivia, math, date, and year facts as plain text or JSON. Supports random numbers, ranges/batches, JSONP callbacks, document.write embedding, sentence-fragment responses, and configurable not-found behavior. url: http://numbersapi.com/ specificationVersion: '0.20' created: '2026-05-28' modified: '2026-05-30' x-source: public-apis/public-apis x-category: Science & Math x-tier: 3 x-tier-reason: opensource-community-api tags: - Science And Math - Public APIs - Trivia - Numbers - Dates - Open Source apis: - name: Numbers API description: >- HTTP API for trivia, math, date, and year facts about numbers. URL pattern is `/{number}/{type}` where type is one of `trivia`, `math`, `date`, or `year`. Numbers may be integers, the keyword `random`, a `month/day` date, or batch ranges. Responses default to plain text and can be returned as JSON via the `json` query parameter. humanURL: http://numbersapi.com/ baseURL: http://numbersapi.com/ tags: - Science And Math - Trivia - Numbers properties: - type: Documentation url: http://numbersapi.com/#api - type: APIReference url: http://numbersapi.com/#api - type: GettingStarted url: http://numbersapi.com/#api - type: OpenAPI url: openapi/numbers-openapi.yml - type: JSONSchema url: json-schema/numbers-fact-schema.json - type: JSONSchema url: json-schema/numbers-batch-facts-schema.json - type: JSONStructure url: json-structure/numbers-fact-structure.json - type: JSONStructure url: json-structure/numbers-batch-facts-structure.json - type: Example url: examples/numbers-fact-example.json - type: Example url: examples/numbers-trivia-fact-example.json - type: Example url: examples/numbers-math-fact-example.json - type: Example url: examples/numbers-date-fact-example.json - type: Example url: examples/numbers-year-fact-example.json - type: Example url: examples/numbers-batch-facts-example.json - type: NaftikoCapability url: capabilities/numbers-trivia.yaml - type: NaftikoCapability url: capabilities/numbers-math.yaml - type: NaftikoCapability url: capabilities/numbers-date.yaml - type: NaftikoCapability url: capabilities/numbers-year.yaml - type: NaftikoCapability url: capabilities/numbers-batch.yaml common: - type: Website url: http://numbersapi.com/ - type: Documentation url: http://numbersapi.com/#api - type: Blog url: http://david-hu.com/2012/03/05/announcing-numbers-api.html - type: Contact url: mailto:numbersapi@gmail.com - type: PublicAPIsListing url: https://github.com/public-apis/public-apis - type: SpectralRules url: rules/numbers-rules.yml - type: Vocabulary url: vocabulary/numbers-vocabulary.yml - type: JSONLD url: json-ld/numbers-context.jsonld - type: Features data: - name: Trivia Facts description: >- Return a piece of trivia about a number, e.g. `42 is the number of little squares forming the left side trail of Microsoft's Windows 98 logo`. - name: Math Facts description: >- Return a mathematical property of a number, e.g. `5 is the number of platonic solids`. - name: Date Facts description: >- Return a fact about a day of the year (month/day), e.g. `February 29 is the day in 1504 that Christopher Columbus uses his knowledge of a lunar eclipse to convince Native Americans to provide him with supplies`. - name: Year Facts description: >- Return a fact about a year, e.g. `1969 is the year that an estimated 500 million people worldwide watch Neil Armstrong take his historic first steps on the Moon`. - name: Random Numbers description: >- Use the keyword `random` in place of a number to get a random fact, optionally bounded by `min` and `max` query parameters. - name: JSON Responses description: >- Append `?json` (or send `Content-Type: application/json`) to receive the fact wrapped in an object with `text`, `found`, `number`, `type`, and optional `date`/`year` fields. - name: Sentence Fragment Mode description: >- Append `?fragment` to get the fact rephrased as a lowercase, no- terminal-punctuation fragment suitable for embedding in a larger sentence. - name: Configurable Not Found Behavior description: >- Use `notfound=default|floor|ceil` to control what happens when no fact exists for the requested number, with an optional custom `default=...` message. - name: JSONP Callback description: >- Pass `callback=functionName` to wrap the response in a JSONP function call. - name: Document.write Embed description: >- Pass `write` to wrap the response in `document.write(...)`, allowing a single `