Windsor.ai Connectors API Documentation
Overview
Windsor.ai Connectors provide a unified API to access data from over 300 marketing, analytics, and business platforms. This documentation will guide you through the process of using our API to retrieve data from various sources.
Getting Started
Authentication
All API requests require an API key for authentication. You can obtain your API key from your Windsor.ai account. Please, keep in mind that your API key can’t be changed at the moment.
Include your API key in all requests using the api_key
parameter:
https://connectors.windsor.ai/{connector}?api_key=your_api_key_here&fields=date,spend
Base URL
The base URL for all API requests is:
https://connectors.windsor.ai
Making API Requests
Basic Request Structure
A basic API request follows this format:
https://connectors.windsor.ai/{connector}?fields={field1,field2,...}&api_key={your_api_key}
Where:
{connector}
is the name of the data source (e.g., facebook, googleanalytics4, linkedin){field1,field2,...}
is a comma-separated list of fields you want to retrieve{your_api_key}
is your Windsor.ai API key
Required Parameters
Every API request must include these parameters:
Parameter | Description |
---|---|
api_key | Your Windsor.ai API key |
fields | Comma-separated list of fields to retrieve |
Optional Parameters
You can customize your data request with these optional parameters:
Parameter | Description | Example |
---|---|---|
date_preset | Predefined date range | last_7d , last_30d , last_90d , last_month , last_year |
date_from | Start date (YYYY-MM-DD) | 2023-01-01 |
date_to | End date (YYYY-MM-DD) | 2023-01-31 |
sort | Field to sort by | date |
order | Sort order | asc or desc |
limit | Maximum number of records to return | 100 |
offset | Number of records to skip | 0 |
filter | Filter expression | campaign eq "Summer Sale" |
date_aggregation | Group results by time period | day , week , month , year |
Date Filtering
You can specify date ranges in two ways:
Using
date_preset
:https://connectors.windsor.ai/facebook?fields=date,spend&date_preset=last_30d
Using
date_from
anddate_to
:https://connectors.windsor.ai/facebook?fields=date,spend&date_from=2023-01-01&date_to=2023-01-31&api_key={your_api_key}
Available date presets:
today
yesterday
last_7d
(Last 7 days)last_30d
(Last 30 days)last_90d
(Last 90 days)last_month
(Previous calendar month)last_year
(Previous calendar year)
Data Filtering
You can filter data using the filter
parameter with expressions. The filter syntax uses field names with operators connected by special characters:
https://connectors.windsor.ai/facebook?fields=date,campaign,spend&api_key={your_api_key}&filter=campaign_$eq.Summer Sale
Filter Operators
Operator | Description | Example |
---|---|---|
$eq | Equals | campaign_$eq.Summer Sale |
$neq | Not equals | campaign_$neq.Winter Sale |
$gt | Greater than | spend_$gt.100 |
$gte | Greater than or equal | spend_$gte.100 |
$lt | Less than | spend_$lt.100 |
$lte | Less than or equal | spend_$lte.100 |
$contains | Contains substring | campaign_$contains.Sale |
$ncontains | Does not contain substring | campaign_$ncontains.Test |
Combining Filters
You can combine multiple filters using *$and*
and *$or*
operators:
https://connectors.windsor.ai/facebook?fields=date,campaign,spend&filter=campaign_$contains.Sale*$and*spend_$gt.100&api_key={your_api_key}
For complex filters with multiple conditions:
https://connectors.windsor.ai/googleanalytics4?fields=date,event_name,date_hour&filter=event_name_$eq.solicitud_depositada_usuario_nuevo*$and*date_hour_$neq.(other)*$and*date_hour_$neq.(not set)&api_key={your_api_key}
This example filters for:
- Events named “solicitud_depositada_usuario_nuevo” AND
- Where date_hour is not “(other)” AND
- Where date_hour is not “(not set)”
Data Aggregation
You can aggregate data by time periods using the date_aggregation
parameter:
https://connectors.windsor.ai/facebook?fields=date,spend&date_aggregation=month&api_key={your_api_key}
Available aggregation periods:
day
(default)week
month
year
Discovering Available Connectors and Fields
Listing All Connectors
You can get a list of all available connectors by making a request to:
https://connectors.windsor.ai/list_connectors
This endpoint returns a JSON array of all connectors that are available through the Windsor.ai API.
Retrieving Available Fields
To see what fields are available for a specific connector, use:
https://connectors.windsor.ai/{connector}/fields
For example, to get all available fields for Facebook:
https://connectors.windsor.ai/facebook/fields
When authenticated with your API key, this endpoint will also return any custom fields that have been configured for your account:
https://connectors.windsor.ai/facebook/fields?api_key={your_api_key}
The response includes detailed information about each field, including:
- Field ID (used in API requests)
- Field name (human-readable name)
- Field type (TEXT, NUMERIC, DATE, etc.)
- Field description
This information is essential for constructing effective API queries and understanding the data structure of each connector.
Supported Connectors
Windsor.ai supports over 300 connectors, including:
- Social Media: Facebook, Instagram, LinkedIn, Twitter, TikTok, Snapchat, Pinterest
- Search & Display: Google Ads, Microsoft Bing, Google Search Ads, DV360, CM360
- Analytics: Google Analytics 4, Adobe Analytics, Mixpanel, Amplitude
- CRM & Marketing: Salesforce, HubSpot, Marketo, Mailchimp
- E-commerce: Shopify, WooCommerce, Amazon, Stripe
- And many more…
For a complete list of connectors and their specific fields, please refer to our Connectors Directory.
Field Types
Fields returned by the API can have the following types:
Type | Description | Example |
---|---|---|
TEXT | Text values | Campaign names, ad titles |
NUMERIC | Numeric values | Spend, impressions, clicks |
TIMESTAMP | Date and time values | Date field |
DATE | Date values | Date field |
BOOLEAN | Boolean values | True/false flags |
OBJECT | Complex objects | JSON structures |
Response Format
API responses are returned in JSON format:
{
"data": [
{
"date": "2023-01-01",
"spend": 125.45,
"impressions": 10234,
"clicks": 342
},
{
"date": "2023-01-02",
"spend": 134.67,
"impressions": 11456,
"clicks": 389
}
],
"meta": {
"total_count": 31,
"returned_count": 2
}
}
Error Handling
When an error occurs, the API will return an appropriate HTTP status code and a JSON response with error details:
{
"error": {
"code": "authentication_error",
"message": "Invalid API key provided"
}
}
Common error codes:
HTTP Status | Error Code | Description |
---|---|---|
400 | invalid_request | The request is malformed or missing required parameters |
401 | authentication_error | Invalid API key or authentication credentials |
403 | permission_denied | The API key doesn’t have permission to access the requested resource |
404 | not_found | The requested connector or resource doesn’t exist |
429 | rate_limit_exceeded | Too many requests in a given amount of time |
500 | server_error | An unexpected server error occurred |
Rate Limits
API requests are subject to rate limits to ensure fair usage. The current rate limits are:
- 600 requests per minute
- 10,000 requests per day
If you exceed these limits, you’ll receive a 429 status code. The response will include headers indicating your remaining quota and when it will reset.
Renderers
The _renderer
parameter specifies the format of the data returned by the Windsor.ai API. Available options include:
- JSON: returns data in JSON format, ideal for web applications and integrations.
https://connectors.windsor.ai/googleanalytics4?api_key=your_api_key&fields=date,spend&_renderer=json
- CSV: returns data in CSV format, suitable for spreadsheets and data analysis.
https://connectors.windsor.ai/googleanalytics4?api_key=your_api_key&fields=date,spend&_renderer=csv
- Google Sheets: directly imports data into Google Sheets.
https://connectors.windsor.ai/googleanalytics4?api_key=your_api_key&fields=date,spend&_renderer=googlesheets
Default: If no _renderer
is specified, the API returns JSON format by default.
Example Use Cases
Retrieving Campaign Performance
https://connectors.windsor.ai/facebook?fields=date,campaign,spend,impressions,clicks&date_preset=last_30d&api_key={your_api_key}
Comparing Multiple Platforms
https://connectors.windsor.ai/all?fields=date,source,spend,impressions,clicks&date_preset=last_30d&api_key={your_api_key}
Getting E-commerce Conversion Data
https://connectors.windsor.ai/googleanalytics4?fields=date,campaign,transactions,revenue&date_preset=last_30d&api_key={your_api_key}
Best Practices
Request Only Needed Fields: Limit your requests to only the fields you need to improve performance.
Use Date Presets: When possible, use date presets instead of custom date ranges for better caching.
Implement Caching: Cache API responses on your end to reduce the number of requests.
Handle Pagination: For large datasets, use the
limit
andoffset
parameters to paginate through results.Error Handling: Implement proper error handling in your application to gracefully handle API errors.
User Agent
When making API requests to Windsor.ai connectors, the system identifies itself using the following user agent:
Windsor/1.0
This user agent is automatically included in all API requests made through our official SDKs and libraries. If you’re building custom integrations or directly interacting with our API, we recommend including this user agent in your requests for better tracking and support.
Support
If you encounter any issues or have questions about using our API, please contact our support team at [email protected] or visit our Help Center.
Changelog
2025-04-02
- Added information about different renderers
2025-03-18
- Added information about user agent
2025-03-17
- Initial API documentation release