API Collection

Random API

The Random API is designed to generate dynamic and unpredictable data for testing, development, and prototyping purposes. It can return various data types such as strings, integers, decimals, arrays, objects, and booleans.

How to Use:
Send a GET request to the endpoint below:
/random

Optional Parameters:
You can customize the response using query parameters:

  • type — Specify the data type (string, integer, array, object, boolean, decimal, all)
  • length — Define the length/size of the generated data
Example:
https://ami-api.my.id/random?type=string&length=10

Example Response:
{ "type": "string", "data": "Xk29sLmQpZ" }

Each request produces a different result, making this API ideal for generating mock data, stress testing, or simulating real-world scenarios in your application.

Haversine API

The Haversine API calculates the straight line distance between two geographic points based on their latitude and longitude coordinates. It uses the :contentReference[oaicite:0]{index=0} to determine the shortest distance over the earth’s surface (great-circle distance).

This API supports distance output in both kilometers (km) and miles, making it suitable for location-based services, mapping applications, logistics, and travel systems.

Example usage:
https://ami-api.my.id/haversine?lat1=-6.175389&lon1=106.827139&lat2=-7.6078738&lon2=110.2037513