diff --git a/core/pom.xml b/core/pom.xml
index d110402..2e8728d 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -261,7 +261,7 @@
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Krill</artifactId>
-			<version>0.56.1</version>
+			<version>0.56.2</version>
 			<exclusions>
 				<exclusion>
 					<groupId>org.xerial</groupId>
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);
+	};
 }
