> ## Documentation Index
> Fetch the complete documentation index at: https://doc.eazemyapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Response format

All APIs generated by EazeMyAPI return responses in **JSON format**.

Each response follows a consistent structure so developers can easily process the data.

## Standard Response Structure

```json theme={null}
{
  "success": true,
  "message": "Data found.",
  "data": []
}
```

***

## Response Fields

| Field   | Description                                    |
| ------- | ---------------------------------------------- |
| success | Indicates whether the request was successful   |
| message | A human-readable message explaining the result |
| data    | The actual data returned by the API            |

***

## Demo Project API Request

**Demo Project Endpoint:**

```
https://api.eazemyapi.com/demo-project/v2/posts-by-category
```

**cURL Example:**

```bash theme={null}
curl https://api.eazemyapi.com/demo-project/v2/posts-by-category
```

[https://api.eazemyapi.com/soche-india/v2/posts-by-category](https://api.eazemyapi.com/soche-india/v2/posts-by-category)

````

**cURL Example:**

```bash
curl https://api.eazemyapi.com/soche-india/v2/posts-by-category
````

***

## Example Successful Response

```json theme={null}
{
  "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 restaurant in the world"
    },
    {
      "category_id": "c40a4731-a541-4d2b-af77-326af7142aab",
      "category_name": "Foods",
      "post_id": "5f8b35c8-372c-4ab2-9c01-569085f05a72",
      "description": "Best restaurant in Ahmedabad"
    },
    {
      "category_id": "c40a4731-a541-4d2b-af77-326af7142aab",
      "category_name": "Foods",
      "post_id": "9de87c8f-3ac0-43d7-97ab-a68681b15f9e",
      "description": "Chaiwala in Ahmedabad"
    }
  ]
}
```

***

## Example Error Response

If an error occurs, the API returns:

```json theme={null}
{
  "success": false,
  "message": "Data not found",
  "data": []
}
```

***

## Response Types

Depending on the request, EazeMyAPI APIs may return different structures in the `data` field.

### Single Record

```json theme={null}
{
  "success": true,
  "message": "Data found.",
  "data": {
    "id": 1,
    "name": "Dara Singh",
    "email": "dara.singh@example.com"
  }
}
```

### Multiple Records

```json theme={null}
{
  "success": true,
  "message": "Data found.",
  "data": [
    { "name": "Dara Singh" },
    { "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

* [Database Schema](/docs/database-schema)
* [Field Types](/docs/field-types)
