> ## Documentation Index
> Fetch the complete documentation index at: https://hm-95ec977f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Filtered Notes

> Retrieve notes filtered by category, group, or archived status

# Get Filtered Notes

Retrieve notes with optional filtering by category, group, and archived status. Use query parameters to filter the results according to your needs.

## Query Parameters

<ParamField query="category" type="string" optional>
  Filter notes by category. Valid values: `css`, `val-town`, `prompts`, `notes`, `chat-gpt`, `cursor-chats`, `bash-commands`
</ParamField>

<ParamField query="group" type="string" optional>
  Filter notes by group. Valid values: `first`, `second`, `third`, `fourth`, `fifth`
</ParamField>

<ParamField query="archived" type="boolean" optional>
  Filter by archived status. Valid values: `true`, `false`
</ParamField>

## Examples

<CodeGroup>
  ```bash Filter by Category theme={null}
  curl -X GET "https://arfan-notes.val.run/api/notes?category=css" \
    -H "Content-Type: application/json"
  ```

  ```bash Filter by Group theme={null}
  curl -X GET "https://arfan-notes.val.run/api/notes?group=first" \
    -H "Content-Type: application/json"
  ```

  ```bash Filter by Archived Status theme={null}
  curl -X GET "https://arfan-notes.val.run/api/notes?archived=false" \
    -H "Content-Type: application/json"
  ```

  ```bash Multiple Filters theme={null}
  curl -X GET "https://arfan-notes.val.run/api/notes?category=css&group=first&archived=false" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript Example theme={null}
  // Filter by category and group
  const response = await fetch('https://arfan-notes.val.run/api/notes?category=css&group=first', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }
  });

  const filteredNotes = await response.json();
  console.log(filteredNotes);
  ```

  ```python Python Example theme={null}
  import requests

  # Filter by multiple parameters
  params = {
      'category': 'val-town',
      'archived': 'false'
  }

  response = requests.get('https://arfan-notes.val.run/api/notes', params=params)
  filtered_notes = response.json()
  print(filtered_notes)
  ```
</CodeGroup>

## Response

<ResponseExample>
  ```json Example Response (filtered by category=css) theme={null}
  [
    {
      "id": 1,
      "title": "CSS Grid Layout",
      "content": "CSS Grid is a powerful layout system that allows you to create complex layouts with ease...",
      "category": "css",
      "group": "first",
      "color": "primary",
      "archived": false,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": 15,
      "title": "Flexbox vs Grid",
      "content": "Understanding when to use Flexbox vs CSS Grid...",
      "category": "css",
      "group": "second",
      "color": "info",
      "archived": false,
      "createdAt": "2024-01-20T09:15:00Z",
      "updatedAt": "2024-01-20T09:15:00Z"
    }
  ]
  ```
</ResponseExample>

## Use Cases

* **Category Filtering**: Get all notes related to a specific technology or topic
* **Group Filtering**: Retrieve notes from a specific organizational group
* **Archived Filtering**: Show only active notes or only archived notes
* **Combined Filtering**: Use multiple filters to narrow down results precisely
