Yes, Agent Search fully supports pagination and has strict parameter limits. However, understanding the difference between its behavior data (real-time) and its content catalog data (delayed) is crucial when handling instant page refreshes. [1, 2, 3]
Agent Search utilizes traditional API offset parameters to handle page requests natively. [3, 4]
- How Pagination Works: When calling the Python SDK, you pass page_size (the number of items per page) and a page_token (retrieved from the previous API response) to fetch subsequent pages. [5]
- Maximum Results Limit: The standard maximum number of items returned per individual query is 100 results for recommendations and up to 10,000 documents for broad search queries. Deep pagination past 10,000 records requires filtering or query refinement. [6, 7, 8, 9]
If a user hits “refresh” on your app, the engine splits its logic into two separate data layers to compute the new feed: [1]
User actions—such as streaming a view-item event or a watch-time metric via the API—are processed instantly (real-time). [10]
- The Refresh Scenario: If a user watches a video and immediately pulls down to refresh their screen, Agent Search registers that interaction event in milliseconds. The very next query will actively factor that event in, suppressing the video they just finished and elevating videos related to it. [10]
The actual catalog dataset (the video titles, description metadata, and text tags stored in BigQuery or Cloud Storage) is not available in real-time. [1, 11]
- The Refresh Scenario: If a creator uploads a brand-new video and a user pulls down to refresh their feed 2 seconds later, that new video will not appear.
- The Sync Window: Agent Search ingests catalog changes on a periodic batch sync schedule (typically configured for every 1 to 5 days or manually triggered via a long-running API import operation). [1, 11]
Because a social video app cannot wait 24 hours for a new video to enter the recommendation algorithm, you should use a Hybrid Injection Pattern in your Python backend:
# 1. Fetch your core algorithmic payload from Agent Search (Factors real-time actions)
agent_recommendations = get_agent_search_recommendations(user_id)
# 2. Query Firestore directly for hot/new videos uploaded in the last 10 minutes
new_videos = db.collection("videos").order_by("timestamp", descending=True).limit(2).get()
# 3. Blend the results before sending them to the client application
final_feed = interleave_feeds(new_videos, agent_recommendations)
Would you like to see how to format the page_token loop using the Python SDK for scroll pagination, or how to manually trigger a catalog data store refresh via an API call?
[1] https://docs.cloud.google.com [2] https://stackoverflow.com [3] https://github.com [4] https://docs.sitesearch360.com [5] https://www.scaler.com [6] https://www.elastic.co [7] https://stackoverflow.com [8] https://docs.developers.optimizely.com [9] https://experienceleague.adobe.com [10] https://docs.cloud.google.com [11] https://docs.cloud.google.com