I am currently using the SharePoint search rest api on a document library. The search results are coming fine. Now I have a requirement where I want to filter the search results based on the Author of the document that is uploaded. 

Below is the query I am using to filter the search results based on current logged in user. The aim is to filter the results from the `Created By` column

```
var url = "http:../_api/search/query?querytext='AnyText+AND+Author:{User}+AND+ListId:a87b68a9-06fd-421c-ae0e-c93416e7e612+AND+IsDocument=True'";

```

This query is not returning any results. However if I pass the username hard-coded the results are coming as expected. e.g.

```
 var url = "http:../_api/search/query?querytext='AnyText+AND+Author:Test User (Company)+AND+ListId:a87b68a9-06fd-421c-ae0e-c93416e7e612+AND+IsDocument=True'";

```

So the above query works fine. 

So my question is, Is there a way to pass the current logged in user in the `Author`.

```
Author:{User}
Author:{User.Title}

```

Unfortunately the above approach is not working fine as I think the api is not get the current user.

Source: [Link 1](https://sharepoint.stackexchange.com/questions/207269/search-content-webpart-only-show-documents-from-current-user) [Link 2](https://sharepoint.stackexchange.com/questions/224966/search-rest-api-for-documents-modified-by-logged-in-user)

Thanks in advance..!!