Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Vertex AI Search & Conversation Website Search - Restricting by date

We've used the google custom json api solution, which is the same as Google.com so you can use the operators for date range or last 24 hrs , last 7 days, etc.  We were told we had to migrate, but I can't find a way with the API to restrict results by date range. We want popular recent posts. Recent sorting would drown out popular posts. Is their a formal or if not alternative way to match on field names with dates?  This way we can send multiple search with each day? Are we able to just use dates in our search in general and it match on dates in any fields?  Is there another way of doing this, since I'm not even sure these ideas would work? Please help me on this, or Google I would request you make new parameters if you are going to depreciate the old API, as it seems your forcing migration which is okay, but we do need the same result as before.

 

https://www.googlecloudcommunity.com/gc/AI-ML/ROLES-required-for-Migration-from-Custom-Search-Site-R...

5 1 998
1 REPLY 1

It sounds like you're encountering challenges with migrating from the Google Custom Search JSON API and are looking for ways to achieve similar functionality, particularly filtering results by date range. Unfortunately, the Google Custom Search JSON API does not directly support filtering by date range.

However, there are alternative approaches you can consider:

  • While the API itself might not support date range filtering, you can still utilize Google Search operators within your queries to specify date ranges. For example, you can include "before:" and "after:" operators to filter results within a certain timeframe.
  •  As you mentioned, you could conduct multiple searches, each targeting a specific date range. While this approach may increase the complexity of your implementation, it can help you achieve the desired result of retrieving popular recent posts.