diff --git a/date_facets.facetapi.inc b/date_facets.facetapi.inc
index db4dfe9..6bf5862 100644
--- a/date_facets.facetapi.inc
+++ b/date_facets.facetapi.inc
@@ -37,5 +37,11 @@ function date_facets_facetapi_query_types() {
         'adapter' => 'search',
       ),
     ),
+    'search_api_date_range' => array(
+      'handler' => array(
+        'class' => 'Drupal_SearchApi_Facetapi_QueryType_DateRangeQueryType',
+        'adapter' => 'search_api',
+      ),
+    )
   );
 }
diff --git a/date_facets.info b/date_facets.info
index 436c477..8a40ed2 100644
--- a/date_facets.info
+++ b/date_facets.info
@@ -6,6 +6,7 @@ core = 7.x
 files[] = lib/Drupal/Apachesolr/Facetapi/QueryType/DateRangeQueryType.php
 files[] = lib/Drupal/Facetapi/Widget/DateRangeWidget.php
 files[] = lib/Drupal/Search/Facetapi/QueryType/DateRangeQueryType.php
+files[] = lib/Drupal/SearchApi/Facetapi/QueryType/DateRangeQueryType.php
 
 ; Information added by drupal.org packaging script on 2012-11-09
 version = "7.x-1.0-beta1"
diff --git a/date_facets.module b/date_facets.module
index 4d7e4c2..16a53c4 100644
--- a/date_facets.module
+++ b/date_facets.module
@@ -14,6 +14,7 @@ function date_facets_facetapi_facet_info_alter(array &$facet_info, array $search
   switch ($searcher_info['adapter']) {
     case 'apachesolr':
     case 'search':
+    case 'search_api':
       date_facets_associate_widget($facet_info);
       break;
   }
@@ -28,19 +29,44 @@ function date_facets_facetapi_facet_info_alter(array &$facet_info, array $search
 function date_facets_associate_widget(array &$facet_info) {
   foreach ($facet_info as $name => $info) {
     $query_types = array_flip($info['query types']);
-    if (isset($query_types['date'])) {
+    // The check on field_type is specific for search api.
+    // @todo check if there is a beter way to do this.
+    if (isset($query_types['date']) || $info['field type'] == 'list<date>') {
       $facet_info[$name]['query types'][] = 'date_range';
+      // This widget needs a different way to set labels
+      // so we add our own callback.
+      $facet_info[$name]['map options']['value callback'] = '_date_facets_api_facet_create_label';
     }
   }
 }
 
 /**
+ * Value callback for labels with the date range type.
+ *
+ * Just added a basic functionality.
+ * Might need to be expanded for more functionality.
+ *
+ * @param array $values
+ * @param array $options
+ * @return array
+ */
+function _date_facets_api_facet_create_label(array $values, array $options) {
+  $map = array();
+
+  // Loop through all the values to create a map.
+  // It does nothing yet but more functionality might be added.
+  foreach ($values as $key => $value) {
+    $map[$key] = $value;
+  }
+
+  return $map;
+}
+
+/**
  * Returns render arrays for all date ranges.
  *
  * @return array
  *   An associative array of date ranges.
- *
- * @todo Implement an alter hook?
  */
 function date_facets_get_ranges() {
   $build = array();
@@ -48,27 +74,34 @@ function date_facets_get_ranges() {
   $build['past_hour'] = array(
     '#count' => NULL,
     '#markup' => t('Past hour'),
+    '#time_interval' => 3600,
   );
 
   $build['past_24_hours'] = array(
     '#count' => NULL,
     '#markup' => t('Past 24 hours'),
+    '#time_interval' => 86400,
   );
 
   $build['past_week'] = array(
     '#count' => NULL,
     '#markup' => t('Past week'),
+    '#time_interval' => 604800,
   );
 
   $build['past_month'] = array(
     '#count' => NULL,
     '#markup' => t('Past month'),
+    '#time_interval' => strtotime('-1 month'),
   );
 
   $build['past_year'] = array(
     '#count' => NULL,
     '#markup' => t('Past year'),
+    '#time_interval' => strtotime('-1 year'),
   );
 
+  drupal_alter('date_facets_get_ranges', $build);
+
   return $build;
 }
