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
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_token | string | No* | Base64-encoded JWT (starts with eyJ...). Not the user ID. |
uid | string | No* | Consented user ID (typically starts with psub_). Not the auth token. |
begin | string | No | Start time filter (ISO 8601) |
end | string | No | End time filter (ISO 8601) |
ingested_begin | string | No | Ingestion start (for delta queries) |
ingested_end | string | No | Ingestion end (for delta queries) |
category | string | No | Filter by category (e.g., “/Shopping”) |
cursor | string | No | Pagination cursor from previous response |
limit | number | No | Max results per request (default 100, max 1000) |
Response Format
Example Usage
Tool: get_youtube_data
Retrieve user YouTube watch history and interactions.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_token | string | No* | Base64-encoded JWT (starts with eyJ...). Not the user ID. |
uid | string | No* | Consented user ID (typically starts with psub_). Not the auth token. |
begin | string | No | Start time filter (ISO 8601) |
end | string | No | End time filter (ISO 8601) |
ingested_begin | string | No | Ingestion start (for delta queries) |
ingested_end | string | No | Ingestion end (for delta queries) |
category | string | No | Filter by category (e.g., “/Music”) |
cursor | string | No | Pagination cursor |
limit | number | No | Max results per request |
Response Format
Example Usage
Tool: get_browsing_data
Retrieve user web browsing history (Chrome).Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_token | string | No* | Base64-encoded JWT (starts with eyJ...). Not the user ID. |
uid | string | No* | Consented user ID (typically starts with psub_). Not the auth token. |
begin | string | No | Start time filter (ISO 8601) |
end | string | No | End time filter (ISO 8601) |
ingested_begin | string | No | Ingestion start (for delta queries) |
ingested_end | string | No | Ingestion end (for delta queries) |
category | string | No | Filter by category (e.g., “/Shopping”) |
cursor | string | No | Pagination cursor |
limit | number | No | Max results per request |
Response Format
Example Usage
Tool: get_ads_data
Retrieve user ad interactions (clicks and views).Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_token | string | No* | Base64-encoded JWT (starts with eyJ...). Not the user ID. |
uid | string | No* | Consented user ID (typically starts with psub_). Not the auth token. |
begin | string | No | Start time filter (ISO 8601) |
end | string | No | End time filter (ISO 8601) |
ingested_begin | string | No | Ingestion start (for delta queries) |
ingested_end | string | No | Ingestion end (for delta queries) |
category | string | No | Filter by category |
cursor | string | No | Pagination cursor |
limit | number | No | Max results per request |
Response Format
Example Usage
Tool: get_receipts_data
Retrieve user purchase receipts (email receipts).Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_token | string | No* | Base64-encoded JWT (starts with eyJ...). Not the user ID. |
uid | string | No* | Consented user ID (typically starts with psub_). Not the auth token. |
begin | string | No | Start time filter (ISO 8601) |
end | string | No | End time filter (ISO 8601) |
ingested_begin | string | No | Ingestion start (for delta queries) |
ingested_end | string | No | Ingestion end (for delta queries) |
category | string | No | Filter by category |
cursor | string | No | Pagination cursor |
limit | number | No | Max results per request |
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