Back to Index

API Documentation

The API version of this instance is Version 1.
The base URL of all endpoints is https://hi.snaz.in/api/v1/.

The example JSON responses are not coming from the instance itself and may not have the same data.

Listing images

GET/list
Fetches a list of all the categories along with all of the filenames.

  // https://hi.snaz.in/api/v1/list

  {
    "categories": {
      "example_coffee": {
        "count": 6,
        "files": [
          "4GI-0z5K2i4_coffee.jpg",
          "bTzk95h707g_coffee.jpg",
          "hgjpLGClejo_coffee.jpg",
          "QDTtF7ewaak_coffee.jpg",
          "VwZyfdlvUWw_coffee.jpg",
          "_JOiT2NsV1A_coffee.jpg"
        ]
      },
      ...
    },
    "category_keys": [
      "example_coffee",
      ...
    ]
    "count": 4,
    "image_count": 10
  }
        
GET/:category/list
Fetches a list of filenames within a category.

  // https://hi.snaz.in/api/v1/example_coffee/list
        
  {
    "count": 6,
    "files": [
      "4GI-0z5K2i4_coffee.jpg",
      "bTzk95h707g_coffee.jpg",
      "hgjpLGClejo_coffee.jpg",
      "QDTtF7ewaak_coffee.jpg",
      "VwZyfdlvUWw_coffee.jpg",
      "_JOiT2NsV1A_coffee.jpg"
    ]
  }
        

Getting random images

GET/random
Redirects you to a random image in the instance.
GET/random.json
Fetches a random image in the instance.

  // https://hi.snaz.in/api/v1/random.json
        
  {
    "category": "example_coffee",
    "filename": "QDTtF7ewaak_coffee.jpg",
    "url": "https://hi.snaz.in/example_coffee/QDTtF7ewaak_coffee.jpg"
  }
        

Getting random images from a category

GET/:category/random
Redirects you to a random image in the instance.
GET/:category/random.json
Fetches a random image in the instance.

  // https://hi.snaz.in/api/v1/example_coffee/random.json
        
  {
    "category": "example_coffee",
    "filename": "bTzk95h707g_coffee.jpg",
    "url": "https://hi.snaz.in/example_coffee/bTzk95h707g_coffee.jpg"
  }
        

Badges

Version: https://img.shields.io/endpoint?url=https://hi.snaz.in/badge/v2/version
Image Count: https://img.shields.io/endpoint?url=https://hi.snaz.in/badge/v2/images
Category Count: https://img.shields.io/endpoint?url=https://hi.snaz.in/badge/v2/categories
Image Count in a Category: https://img.shields.io/endpoint?url=https://hi.snaz.in/badge/v2/eightball/images