diff --git a/node_reference/node_reference.api.php b/node_reference/node_reference.api.php
new file mode 100644
index 0000000..0519642
--- /dev/null
+++ b/node_reference/node_reference.api.php
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * @file
+ * Hooks provided by the Node Reference module.
+ */
+
+/**
+ * @addtogroup hooks
+ * @{
+ */
+
+/**
+ * Retrieves an array of candidate referenceable nodes for a given field.
+ *
+ * Useful when you need complex queries to retrieve candidate referenceable nodes.
+ *
+ * @param $field
+ *   The field definition.
+ * @param $options
+ *   An array of options to limit the scope of the returned list. The following
+ *   key/value pairs are accepted:
+ *   - string: string to filter titles on (used by autocomplete).
+ *   - match: operator to match the above string against, can be any of:
+ *     'contains', 'equals', 'starts_with'. Defaults to 'contains'.
+ *   - ids: array of specific node ids to lookup.
+ *   - limit: maximum size of the the result set. Defaults to 0 (no limit).
+ *
+ * @return
+ *   An array of valid nodes in the form:
+ *   array(
+ *     array(
+ *       nid => array(
+ *         'title' => The node title,
+ *         'rendered' => The text to display in widgets (can be HTML)
+ *       ),
+ *       ...
+ *     )
+ *   }
+ *   or FALSE if there is no candidates.
+ */
+function hook_node_reference_FIELD_potential_references($field, $options) {
+  $query = db_select('node', 'n')
+    ->addField('n', 'nid')
+    ->addField('n', 'title', 'node_title')
+    ->condition('n.type', $field['settings']['referenceable_types'], 'IN');
+  $result = $query->execute()->fetchAll();
+  $references = array();
+  foreach ($result as $node) {
+    $references[$node->nid] = array(
+      'title'    => $node->node_title,
+      'rendered' => check_plain($node->node_title),
+    );
+  }
+  return array($references);
+}
\ No newline at end of file
diff --git a/node_reference/node_reference.module b/node_reference/node_reference.module
index 417f258..12fb634 100755
--- a/node_reference/node_reference.module
+++ b/node_reference/node_reference.module
@@ -801,6 +801,10 @@ function node_reference_potential_references($field, $options = array()) {
     }
 
     if ($references === FALSE) {
+      $references = _node_reference_potential_references_from_hook($field, $options);
+    }
+
+    if ($references === FALSE) {
       $references = _node_reference_potential_references_standard($field, $options);
     }
 
@@ -823,6 +827,32 @@ function _node_reference_potential_references_views($field, $options) {
 }
 
 /**
+ * Retrieves candidate referenceable nodes using hook_node_reference_FIELD_potential_references
+ */
+function _node_reference_potential_references_from_hook($field, $options) {
+  $references = array();
+  $hook_name = 'node_reference_' . $field['field_name'] . '_potential_references';
+  foreach (module_invoke_all($hook_name, $field, $options) as $refs) {
+    foreach ($refs as $ref_nid => $ref_titles) {
+      $references[$ref_nid] = $ref_titles;
+    }
+  }
+  uasort($references, '_node_reference_sort_ref');
+  if ($options['limit']) {
+    $references = array_slice($references, $options['limit']);
+  }
+
+  return empty($references) ? FALSE : $references;
+}
+
+function _node_reference_sort_ref($x, $y) {
+  if ($x['rendered'] === $y['rendered']) {
+    return 0;
+  }
+  return $x['rendered'] < $y['rendered'] ? -1 : 1;
+}
+
+/**
  * Helper function for node_reference_potential_references().
  *
  * List of referenceable nodes defined by content types.
