Skip to main content
All APIs generated by EazeMyAPI return responses in JSON format. Each response follows a consistent structure so developers can easily process the data. Typical response structure:
{
  "success": true,
  "message": "Data found.",
  "data": []
}

Response Fields

FieldDescription
successIndicates whether the request was successful
messageA human-readable message explaining the result
dataThe actual data returned by the API

Example API Request

Example endpoint:
https://api.eazemyapi.com/soche-india/v2/posts-by-category
Example request:
curl https://api.eazemyapi.com/soche-india/v2/posts-by-category

Example Successful Response

{
  "success": true,
  "message": "Data found.",
  "data": [
    {
      "category_id": "c40a4731-a541-4d2b-af77-326af7142aab",
      "category_name": "Foods",
      "post_id": "2529c967-33a3-4f7b-aabd-84e90f861e14",
      "description": "Best restaurent in the world"
    },
    {
      "category_id": "c40a4731-a541-4d2b-af77-326af7142aab",
      "category_name": "Foods",
      "post_id": "5f8b35c8-372c-4ab2-9c01-569085f05a72",
      "description": "Best restaurent in the Ahmedabad"
    },
    {
      "category_id": "c40a4731-a541-4d2b-af77-326af7142aab",
      "category_name": "Foods",
      "post_id": "9de87c8f-3ac0-43d7-97ab-a68681b15f9e",
      "description": "Chaiwala in the ahmedabad"
    }
  ]
}

Example Error Response

If an error occurs, the API will return:
{
  "success": false,
  "message": "Data not found",
  "data": []
}

Response Types

EazeMyAPI APIs may return different types of responses depending on the request.

Single Record

{
  "success": true,
  "message": "Data found.",
  "data": {
    "id": 1,
    "name": "Romit",
    "email": "rm@eazemyapi.com"
  }
}

Multiple Records

{
  "success": true,
  "message": "Data found.",
  "data": [
    {
      "name": "Romit"
    },
    {
      "name": "Amit"
    }
  ]
}

Best Practices

When working with EazeMyAPI responses: • Always check the success field first
• Use the message field to display user-friendly messages
• Process data only when success = true

Related Documentation

Learn how database schema works: Database Schema Explore supported data types: Field Types