diff --git a/restws.entity.inc b/restws.entity.inc
index f3e409b..a4e3389 100644
--- a/restws.entity.inc
+++ b/restws.entity.inc
@@ -325,6 +325,30 @@ class RestWSEntityResourceController implements RestWSQueryResourceControllerInt
   protected function propertyQueryOperation(EntityFieldQuery $query, $operation, $property, $value) {
     $properties = $this->propertyInfo();
 
+    if($property === '$filter') {
+      if(!empty($value) && is_array($value)) {
+        // now, $value is array keyed by property name
+        foreach($value as $_property => $_condition) {
+          $split_op_val = _restws_get_filter_operator($_condition);
+          // check property is base or field
+          if(empty($properties[$_property]['field'])) {
+            // yay! property is base
+            $column = $properties[$_property]['schema field'];
+            $query->propertyCondition($_property, $split_op_val['value'], $split_op_val['operator']['query_operator']);
+          }
+          else {
+            // property is field
+            // @todo multiple columns?
+            $field_info = field_info_field($property);
+            $columns = array_keys($field_info['columns']);
+            $column = $columns[0];
+            $query->fieldCondition($field_info, $column, $split_op_val['value'], $split_op_val['operator']['query_operator']);
+          }
+        }
+      }
+      return;
+    }
+
     // If field is not set, then the filter is a property and we can extract
     // the schema field from the property array.
     if (empty($properties[$property]['field'])) {
@@ -353,3 +377,79 @@ class RestWSEntityResourceController implements RestWSQueryResourceControllerInt
     }
   }
 }
+
+function _restws_get_filter_operator($_filter) {
+  $allowed_operators = array(
+    'eq' => array(
+      'name' => 'Equal',
+      'support' => 'string, int, float, dateTime, boolean',
+      'query_operator' => '='
+    ),
+    'ge' => array(
+      'name' => 'Greater than or equal',
+      'support' => 'int, float, dateTime',
+      'query_operator' => '>='
+    ),
+    'gt' => array(
+      'name' => 'Greater than',
+      'support' => 'int, float, dateTime',
+      'query_operator' => '>'
+    ),
+    'le' => array(
+      'name' => 'Less than or equal',
+      'support' => 'int, float, dateTime',
+      'query_operator' => '<='
+    ),
+    'lt' => array(
+      'name' => 'Less than',
+      'support' => 'int, float, dateTime',
+      'query_operator' => '<'
+    ),
+    'ne' => array(
+      'name' => 'Not equal',
+      'support' => 'string, int, float, dateTime, boolean',
+      'query_operator' => '<>'
+    ),
+    // 'like' => array(
+    //   'name' => 'Like',
+    //   'support' => 'string, int, float, dateTime, boolean',
+    //   'query_operator' => ''
+    // ),
+    // 'sw' => array(
+    //   'name' => 'Start with',
+    //   'support' => '?',
+    //   'query_operator' => ''
+    // ),
+    // 'eq' => array(
+    //   'name' => 'End with',
+    //   'support' => '?',
+    //   'query_operator' => ''
+    // ),
+    // 'ct' => array(
+    //   'name' => 'Contain',
+    //   'support' => '?',
+    //   'query_operator' => ''
+    // )
+    // 'and' => array(
+    //   'name' => 'AND operator',
+    //   'support' => 'all',
+    //   'query_operator' => ''
+    // ),
+    // 'or' => array(
+    //   'name' => 'OR operator',
+    //   'support' => 'all',
+    //   'query_operator' => ''
+    // )
+  );
+  if(preg_match('/^~.+~/', $_filter, $matches) && count($matches) > 0) {
+    $operator = str_replace('~', '', $matches[0]);
+    if(!in_array($operator, array_keys($allowed_operators))) {
+      return FALSE;
+    }
+    $value = str_replace("~$operator~", '', $_filter);
+    return array(
+      'operator' => $allowed_operators[$operator],
+      'value' => $value
+    );
+  }
+}
diff --git a/restws.formats.inc b/restws.formats.inc
index 9a1658d..b4e1ac5 100644
--- a/restws.formats.inc
+++ b/restws.formats.inc
@@ -160,8 +160,7 @@ abstract class RestWSBaseFormat implements RestWSFormatInterface {
    */
   public function queryResource($resourceController, $payload) {
     // Get the parameter from the URL.
-    $parameters = drupal_get_query_parameters();
-
+    $parameters = restws_get_query_parameters();
     $rest_controls = restws_meta_controls();
     $properties = $resourceController->propertyInfo();
     $split_parameters = $this->splitParameters($properties, $parameters);
@@ -366,6 +365,12 @@ abstract class RestWSBaseFormat implements RestWSFormatInterface {
         $parameter = substr($parameter, 9, strlen($parameter) - 9);
       }
 
+      // support $filter
+      if(substr($parameter, 0, 7) == '$filter') {
+        $filters[$parameter] = $value;
+        continue;
+      }
+
       // If the parameter doesn't exist, we can not filter for and need to
       // notify the client about it.
       if (!isset($properties[$parameter])) {
@@ -404,7 +409,9 @@ abstract class RestWSBaseFormat implements RestWSFormatInterface {
     $page = isset($parameters[$rest_controls['page']]) ? $parameters[$rest_controls['page']] : 0;
 
     $last = ceil($count / $limit) - 1;
-
+    if(isset($filters['$filter'])) {
+      $last = 0;
+    }
     if ($page > $last || $page < 0) {
       throw new RestWSException('Page doesn\'t exist.', 404);
     }
diff --git a/restws.module b/restws.module
index acfaa6a..ee13102 100644
--- a/restws.module
+++ b/restws.module
@@ -489,3 +489,33 @@ function restws_session_token() {
   print drupal_get_token('restws');
   drupal_exit();
 }
+
+function restws_get_query_parameters(array $query = NULL, array $exclude = array('q'), $parent = '') {
+  // Set defaults, if none given.
+  if (!isset($query)) {
+    $query = $_GET;
+  }
+  // If $exclude is empty, there is nothing to filter.
+  if (empty($exclude)) {
+    return $query;
+  }
+  elseif (!$parent) {
+    $exclude = array_flip($exclude);
+  }
+
+  $params = array();
+  foreach ($query as $key => $value) {
+    $string_key = ($parent ? $parent . '[' . $key . ']' : $key);
+    if (isset($exclude[$string_key])) {
+      continue;
+    }
+
+    if (is_array($value)) {
+      $params[$key] = drupal_get_query_parameters($value, $exclude, $string_key);
+    }
+    else {
+      $params[$key] = $value;
+    }
+  }
+  return $params;
+}
