DexBase

Random Duck

Load a random duck and inspect the image URL and optional message that accompany the JSON response.

Current public response

Load a JSON response with url and, when present, message. The image is random and this call does not search by species or subject.

What the response contains

Load a random duck and inspect the image URL and optional message that accompany the JSON response.

This page uses /api/random, which returns JSON. The documentation also separates /randomimg, which returns an image file directly. Before publishing or reusing a photo, check its address, available attribution, and the rules that apply to your use.

Fields worth checking

  • url: image address
  • message: optional attribution
  • /random returns JSON

The object returned by /random

The documentation describes /random as a route that returns a JSON object with the image link and an optional attribution message. In the observed response, url pointed to the random image and message said “Powered by random-d.uk”.

  • url is the field needed to locate the returned image.
  • message may be present, but it should not become a complete credit without verification.
  • The response does not identify the duck or describe the photograph.

JSON and a direct image are different routes

This page calls /api/random and receives structured data. /randomimg instead returns an image file directly. Choose the first route when an interface needs to read url and message; choose the second only when the flow actually expects a visual file.

  • Do not treat a JSON response as though it were already an embeddable image.
  • The documentation also lists /quack with the same behaviour as /random.
  • The current page does not use /randomimg or search by subject.

Random does not mean free for every use

The home page says images belong to their respective owners. Since the response provides no licence or author, a random URL does not settle publication rights. Check the image and establish your own criteria before displaying it in public material.

  • Do not assign a licence merely because the endpoint returned an image.
  • Review visual content before automatic display.
  • If you need a format filter, the documentation mentions GIF and JPG options; confirm the received result.
Cat Facts Cat fact · Fact text · Text length ClinicalTrials.gov Science & Nature · ClinicalTrials.gov results · public source disease.sh Science & Nature · disease.sh results · public source