diff --git a/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java b/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
index c7123b8..9051484 100644
--- a/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
+++ b/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
@@ -18,6 +18,7 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.response.Match;
+import de.ids_mannheim.korap.response.MetaFields;
 import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.util.QueryException;
 
@@ -144,6 +145,29 @@
     };
 
 
+	/*
+	 * Retrieve the meta fields for a certain document
+	 */
+	public String getFields (String id) {
+		MetaFields meta;
+
+		// No index found
+		if (this.index == null) {
+        	meta = new MetaFields(id);
+        	meta.addError(601, "Unable to find index");
+		}
+
+		// Index available
+		else {
+
+			//Get fields
+			meta = this.index.getFields(id);
+		};
+		return meta.toJsonString();
+	};
+
+
+	
     public String getMatch (String id, List<String> foundries,
             List<String> layers, boolean includeSpans,
             boolean includeHighlights, boolean sentenceExpansion, 
@@ -285,4 +309,16 @@
                 .append('/').append(textID).append('-').append(matchID);
         return sb.toString();
     };
+
+
+    /**
+     * Return the text sigle as a string.
+     */
+    public String getTextSigle (String corpusID, String docID, String textID) {
+        // Create a string representation of the match 
+        StringBuilder sb = new StringBuilder();
+        sb.append(corpusID).append('/').append(docID)
+                .append('/').append(textID);
+        return sb.toString();
+    };
 };
diff --git a/lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java b/lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java
index 73ce86e..cc37c2b 100644
--- a/lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java
+++ b/lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java
@@ -361,4 +361,23 @@
         return Response.ok(results).build();
     }
 
+
+	/*
+     * Returns the meta data fields of a certain document
+     */
+    @GET
+    @Path("/corpus/{corpusId}/{docId}/{textId}")
+    public Response getMeta (
+		@PathParam("corpusId") String corpusId,
+		@PathParam("docId") String docId,
+		@PathParam("textId") String textId,
+		// @QueryParam("fields") Set<String> fields,
+		@Context HttpServletRequest request) throws KustvaktException {
+
+		String textSigle = searchKrill.getTextSigle(corpusId, docId, textId);
+		
+		String results = searchKrill.getFields(textSigle);
+
+        return Response.ok(results).build();
+    }
 }
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
index b0d6284..1d1c41b 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
@@ -5,6 +5,7 @@
 import static org.junit.Assert.assertNotNull;
 
 import java.util.concurrent.ThreadLocalRandom;
+import java.util.*;
 
 import org.apache.lucene.LucenePackage;
 import org.junit.Test;
@@ -261,4 +262,58 @@
         assertEquals("WPD", node.at("/collection/operands/1/value").asText());
     }
 
+	@Test
+	public void testMetaFields () throws KustvaktException {
+        ClientResponse response = resource()
+                .path("/corpus/GOE/AGA/01784")
+                .method("GET", ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String resp = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(resp);
+		System.err.println(node.toString());
+
+		Iterator fieldIter = node.at("/document/fields").elements();
+
+		int checkC = 0;
+		while (fieldIter.hasNext()) {
+			JsonNode field = (JsonNode) fieldIter.next();
+
+			String key = field.at("/key").asText();
+
+			assertEquals("koral:field", field.at("/@type").asText());
+
+			switch (key) {
+			case "textSigle":
+				assertEquals("type:string", field.at("/type").asText());
+				assertEquals("GOE/AGA/01784", field.at("/value").asText());
+				checkC++;
+				break;
+			case "author":
+				assertEquals("type:text", field.at("/type").asText());
+				assertEquals("Goethe, Johann Wolfgang von", field.at("/value").asText());
+				checkC++;
+				break;
+			case "docSigle":
+				assertEquals("type:string", field.at("/type").asText());
+				assertEquals("GOE/AGA", field.at("/value").asText());
+				checkC++;
+				break;
+			case "docTitle":
+				assertEquals("type:text", field.at("/type").asText());
+				assertEquals(
+					"Goethe: Autobiographische Schriften II, (1817-1825, 1832)",
+					field.at("/value").asText()
+					);
+				checkC++;
+				break;
+			case "pubDate":
+				assertEquals("type:number", field.at("/type").asText());
+				assertEquals(19820000, field.at("/value").asInt());
+				checkC++;
+				break;
+			};		
+		};
+		assertEquals(5, checkC);
+	};
 }
