diff --git a/build/index.php b/build/index.php
index 721e024..1e1a1f7 100644
--- a/build/index.php
+++ b/build/index.php
@@ -1044,7 +1044,7 @@ class ids
 			if($entry == $pagename)
 				return $id;
 		}
-
+		
 		// This pagename doesn't have an id - assign it one quick!
 		return self::assign($pagename);
 	}
@@ -2738,6 +2738,54 @@ register_module([
 			//var_dump($results);
 		});
 		
+/*
+ *  ██████  ██    ██ ███████ ██████  ██    ██
+ * ██    ██ ██    ██ ██      ██   ██  ██  ██
+ * ██    ██ ██    ██ █████   ██████    ████  █████
+ * ██ ▄▄ ██ ██    ██ ██      ██   ██    ██
+ *  ██████   ██████  ███████ ██   ██    ██
+ *     ▀▀
+ * ███████ ███████  █████  ██████   ██████ ██   ██ ██ ███    ██ ██████  ███████ ██   ██
+ * ██      ██      ██   ██ ██   ██ ██      ██   ██ ██ ████   ██ ██   ██ ██       ██ ██
+ * ███████ █████   ███████ ██████  ██      ███████ ██ ██ ██  ██ ██   ██ █████     ███
+ *      ██ ██      ██   ██ ██   ██ ██      ██   ██ ██ ██  ██ ██ ██   ██ ██       ██ ██
+ * ███████ ███████ ██   ██ ██   ██  ██████ ██   ██ ██ ██   ████ ██████  ███████ ██   ██
+ */
+
+		/**
+		 * @api {get} ?action=query-searchindex&query={text}	Inspect the internals of the search results for a query
+		 * @apiName Search
+		 * @apiGroup Search
+		 * @apiPermission Anonymous
+		 * 
+		 * @apiParam {string}	query	The query string to search for.
+		 */
+		add_action("query-searchindex", function() {
+			global $env, $paths;
+			
+			if(empty($_GET["query"])) {
+				http_response_code(400);
+				header("content-type: text/plain");
+				exit("Error: No query specified. Specify it with the 'query' GET parameter.");
+			}
+			
+			$env->perfdata->searchindex_decode_start = microtime(true);
+			$searchIndex = search::load_invindex($paths->searchindex);
+			$env->perfdata->searchindex_decode_time = (microtime(true) - $env->perfdata->searchindex_decode_start) * 1000;
+			$env->perfdata->searchindex_query_start = microtime(true);
+			$searchResults = search::query_invindex($_GET["query"], $searchIndex);
+			$env->perfdata->searchindex_query_time = (microtime(true) - $env->perfdata->searchindex_query_start) * 1000;
+			
+			header("content-type: application/json");
+			$result = new stdClass();
+			$result->time_format = "ms";
+			$result->decode_time = $env->perfdata->searchindex_decode_time;
+			$result->query_time = $env->perfdata->searchindex_query_time;
+			$result->total_time = $result->decode_time + $result->query_time;
+			$result->search_results = $searchResults;
+			exit(json_encode($result, JSON_PRETTY_PRINT));
+		});
+		
 		/*
 		 *  ██████  ██████  ███████ ███    ██ ███████ ███████  █████  ██████   ██████ ██   ██
 		 * ██    ██ ██   ██ ██      ████   ██ ██      ██      ██   ██ ██   ██ ██      ██   ██
diff --git a/core.php b/core.php
index 7ec352c..8437e3f 100644
--- a/core.php
+++ b/core.php
@@ -723,7 +723,7 @@ class ids
 			if($entry == $pagename)
 				return $id;
 		}
-
+		
 		// This pagename doesn't have an id - assign it one quick!
 		return self::assign($pagename);
 	}
diff --git a/module_index.json b/module_index.json
index 45f2c59..f3a4cab 100755
--- a/module_index.json
+++ b/module_index.json
@@ -86,7 +86,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
         "id": "feature-search",
-        "lastupdate": 1490302006,
+        "lastupdate": 1490303523,
         "optional": false
     },
     {
diff --git a/modules/feature-search.php b/modules/feature-search.php
index e2bd8d6..6fc185b 100755
--- a/modules/feature-search.php
+++ b/modules/feature-search.php
@@ -193,6 +193,54 @@ register_module([
 			//var_dump($results);
 		});
 		
+/*
+ *  ██████  ██    ██ ███████ ██████  ██    ██
+ * ██    ██ ██    ██ ██      ██   ██  ██  ██
+ * ██    ██ ██    ██ █████   ██████    ████  █████
+ * ██ ▄▄ ██ ██    ██ ██      ██   ██    ██
+ *  ██████   ██████  ███████ ██   ██    ██
+ *     ▀▀
+ * ███████ ███████  █████  ██████   ██████ ██   ██ ██ ███    ██ ██████  ███████ ██   ██
+ * ██      ██      ██   ██ ██   ██ ██      ██   ██ ██ ████   ██ ██   ██ ██       ██ ██
+ * ███████ █████   ███████ ██████  ██      ███████ ██ ██ ██  ██ ██   ██ █████     ███
+ *      ██ ██      ██   ██ ██   ██ ██      ██   ██ ██ ██  ██ ██ ██   ██ ██       ██ ██
+ * ███████ ███████ ██   ██ ██   ██  ██████ ██   ██ ██ ██   ████ ██████  ███████ ██   ██
+ */
+
+		/**
+		 * @api {get} ?action=query-searchindex&query={text}	Inspect the internals of the search results for a query
+		 * @apiName Search
+		 * @apiGroup Search
+		 * @apiPermission Anonymous
+		 * 
+		 * @apiParam {string}	query	The query string to search for.
+		 */
+		add_action("query-searchindex", function() {
+			global $env, $paths;
+			
+			if(empty($_GET["query"])) {
+				http_response_code(400);
+				header("content-type: text/plain");
+				exit("Error: No query specified. Specify it with the 'query' GET parameter.");
+			}
+			
+			$env->perfdata->searchindex_decode_start = microtime(true);
+			$searchIndex = search::load_invindex($paths->searchindex);
+			$env->perfdata->searchindex_decode_time = (microtime(true) - $env->perfdata->searchindex_decode_start) * 1000;
+			$env->perfdata->searchindex_query_start = microtime(true);
+			$searchResults = search::query_invindex($_GET["query"], $searchIndex);
+			$env->perfdata->searchindex_query_time = (microtime(true) - $env->perfdata->searchindex_query_start) * 1000;
+			
+			header("content-type: application/json");
+			$result = new stdClass();
+			$result->time_format = "ms";
+			$result->decode_time = $env->perfdata->searchindex_decode_time;
+			$result->query_time = $env->perfdata->searchindex_query_time;
+			$result->total_time = $result->decode_time + $result->query_time;
+			$result->search_results = $searchResults;
+			exit(json_encode($result, JSON_PRETTY_PRINT));
+		});
+		
 		/*
 		 *  ██████  ██████  ███████ ███    ██ ███████ ███████  █████  ██████   ██████ ██   ██
 		 * ██    ██ ██   ██ ██      ████   ██ ██      ██      ██   ██ ██   ██ ██      ██   ██
