Tools use session credentials by default (provided during connection). You can override per-tool by passing
auth_token and uid parameters.Tool: get_search_data
Retrieve user search history (Google searches).Parameters
Either provide in tool call or use session credentials from connection
Response Format
Example Usage
Tool: get_youtube_data
Retrieve user YouTube watch history and interactions.Parameters
Either provide in tool call or use session credentials from connection
Response Format
Example Usage
Tool: get_browsing_data
Retrieve user web browsing history (Chrome).Parameters
Either provide in tool call or use session credentials from connection
Response Format
Example Usage
Tool: get_ads_data
Retrieve user ad interactions (clicks and views).Parameters
Either provide in tool call or use session credentials from connection
Response Format
Example Usage
Tool: get_receipts_data
Retrieve user purchase receipts (email receipts).Parameters
Either provide in tool call or use session credentials from connection
Response Format
Example Usage
Common Patterns
Pagination
All tools support cursor-based pagination for large datasets:- Make initial request (no
cursorparameter) - Check response
has_morefield - If
true, usenext_cursorin next request - Repeat until
has_more = false
Delta Queries
Useingested_begin/ingested_end to fetch only new data since last sync:
- Store
last_sync_timeafter each sync - Next sync: set
ingested_begin = last_sync_time - Update
last_sync_timeto responseapplied_ingested_end - Repeat on subsequent syncs
Category Filtering
Categories use slash-delimited hierarchical paths:/Shopping- All shopping data/Shopping/Electronics- Electronics only/Food/Restaurants- Restaurant searches/visits
Categories are assigned by Emerge’s classification system. Not all events have categories.
Error Handling
When a tool call fails, it returns an error structure:- 401: Invalid credentials
- 400: Invalid parameters (e.g., malformed timestamp)
- 404: User not found (no consent)
- 429: Rate limit exceeded
- 500: Server error (retry with exponential backoff)
Best Practices
Use
limit: 1000 for balanced performance and memoryAlways check
has_more for complete dataset retrievalUse
ingested_begin/end for incremental syncsApply category filters to reduce data volume
Handle errors gracefully with retry logic
Rate Limits
Per API token limits:- 100 requests/minute
- 1000 requests/hour
Next Steps
Setup Guide
Configure AI tools to use these tools
Query API Reference
HTTP API equivalents
Examples
See workflow examples
MCP Query Setup
Architecture and configuration