Do we have JIRA search API for JIRA agile?

As mentioned in the other threads where you’ve asked this question, JQL is for searching issues and there is no search API for sprints. Jira doesn’t provide an out-of-the-box for grouping sprints by date. As I mentioned in my previous response, the definition of the “date” of a sprint can be interpreted quite differently. I would refer you to the suggestion there or the second one here.