Ive tried to fetch calendar events using this:

_api/search/query?querytext='ContentClass:STS_ListItem_Events EventDate>10/10/2014 EndDate<1/1/2016'&selectproperties='Title,EventDate,EndDate,AllDayEvent'

which brings an error.

"We didn't understand your search terms. Make sure they're using proper syntax."

However, if i remove the enddate and eventdate code like this it works:


where is my syntax error

  • Are you able to get data for AllDayEvent?
    – Mihir
    Apr 21, 2020 at 16:14

1 Answer 1


SharePoint stores dates in the ISO string format. So convert the EndDate and EventDate values first using toISOString(). Also Use ge for greater than instead of >. Similarly use le for less than instead of <. Finally use and to combine two filters together.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.