MlemAPI docs

  • randommlem - returns one random mlem image in JSON.

    https://mlem.tech/api/randommlem
    Parameters:
    tag - tag of mlem
    minwidth - minimum width
    maxwidth - maximum width
    minheight - minimum height
    maxheight - maximum height
    orientation - image orientation: square, landscape, portrait
    brightness - image brightness: dark or bright (experimental)

  • newmlem - returns one most recently published mlem image in JSON.

    https://mlem.tech/api/newmlem

    No parameters

    • API call and response example:
      https://mlem.tech/api/newmlem
      {
          "id": 9702,
          "url": "https:\/\/mlem.tech\/mlems\/1597200189571.jpg",
          "width": 3024,
          "height": 4032,
          "orientation": "portrait",
          "brightness": "dark",
          "tags": [
              "Cat"
          ],
          "code": 200
      }
  • mlemid - returns one mlem image by id in JSON.

    https://mlem.tech/api/randommlem?mlemid=[id]

    Parameters:
    mlemid - mlem id

    • API call and response example:
      https://mlem.tech/api/randommlem?mlemid=1
      {
          "id": 1,
          "url": "https:\/\/mlem.tech\/mlems\/1575713370775.jpg",
          "width": 608,
          "height": 960,
          "orientation": "portrait",
          "brightness": "dark",
          "tags": [
              "Lamb",
              "Valais blacknose sheep",
              "Sheep"
          ],
          "code": 200
      }
  • tags - returns all tags in JSON.

    https://mlem.tech/api/tags

    No parameters

    • API call and response example:
      https://mlem.tech/api/tags
      [
          "Aardvark",
          "Anteater",
          "Bat-eared fox",
          "Bear",
          "Bee"
      ]

      Amount of tags in response example is limited to reduce length of the example.