Hi @matt howell ,
As far as I know, we could use the KQL syntax to include "today" in the query. Like this:
querytext='SPContentType:"Site Page" AND IsDocument:True AND FileExtension:aspx AND PromotedState:2 AND FirstPublishedDate<today'
You could refer to this article: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference
Besides, the js code using filter also works in my end. Please share the code how do you build the url. I notice that you miss a double quote in the end. Could it be the issue.
Below is my rest api:
$.ajax({
url: "https://xxx.sharepoint.com/sites/xxx/_api/web/lists/GetByTitle('Site Pages')/items?$filter=FirstPublishedDate le datetime'" + today.toISOString() + "'",
...
});
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.