diff --git a/search_api.rules.inc b/search_api.rules.inc
new file mode 100644
index 0000000..b792c55
--- /dev/null
+++ b/search_api.rules.inc
@@ -0,0 +1,86 @@
+<?php
+
+/**
+ * @file
+ * Search API Rules integration.
+ */
+
+
+/**
+ * Implements hook_rules_action_info().
+ */
+function search_api_rules_action_info() {
+  $items['search_api_index'] = array (
+   'parameter' => array(
+      'entity' => array(
+        'type' => 'entity',
+        'label' => t('Entity'),
+      ),
+      'index' => array(
+        'type' => 'search_api_index',
+        'label' => t('Index'),
+        'optional' => TRUE,
+      ),
+      'index_immediately' => array(
+        'type' => 'boolean',
+        'label' => t('Index immediately'),
+        'optional' => TRUE,
+        'default value' => TRUE,
+        'restriction' => 'input',
+      ),
+    ),
+    'group' => t('Search API'),
+    'access callback' => '_search_api_rules_access',
+    'label' => t('Index an entity'),
+    'base' => '_search_api_rules_action_index',
+  );
+  return $items;
+}
+
+/**
+ * Rules access callback for search api actions.
+ */
+function _search_api_rules_access() {
+  return user_access('administer search_api');
+}
+
+/**
+ * Rules action for indexing an item.
+ */
+function _search_api_rules_action_index(EntityDrupalWrapper $wrapper, SearchApiIndex $index = NULL, $index_immediately = TRUE) {
+  $type = $wrapper->type();
+  $item_ids = array($wrapper->getIdentifier());
+
+  if (empty($index) && !$index_immediately) {
+    search_api_track_item_change($type, $item_ids);
+    return;
+  }
+
+
+  if ($index) {
+    $indexes = array($index);
+  }
+  else {
+    $conditions = array(
+      'enabled' => 1,
+      'item_type' => $type,
+      'read_only' => 0,
+    );
+    $indexes = search_api_index_load_multiple(FALSE, $conditions);
+    if (!$indexes) {
+      return;
+    }
+  }
+  if ($index_immediately) {
+    foreach ($indexes as $index) {
+      $indexed = search_api_index_specific_items_delayed($index, $item_ids);
+    }
+  }
+  else {
+    search_api_get_datasource_controller($type)->trackItemChange($item_ids, $indexes);
+  }
+}
+
+function _search_api_rules_action_index_help() {
+  return t('Queues an item for reindexing. If "index immediately" is disabled then the item will be indexed during the next cron run.');
+}
