Get Deals
Retrieve deals with flexible filtering, sorting, and pagination. Returns deal objects with all their properties and relationships. Use this for real-time data access and integrations.
Copy for AI context
Copy for AI context
Overview
Use this endpoint to programmatically access your deal data with real-time filtering and pagination. Unlike bulk export which generates a CSV file, this endpoint returns JSON objects immediately and is ideal for:- Building custom dashboards and reports
- Syncing deal data to external systems
- Real-time data access for integrations
- Paginating through large datasets
Pagination
| Parameter | Type | Description | Default |
|---|---|---|---|
page_size | number | Number of deals to return per page | 50 |
page_index | number | Zero-based page index | 0 |
count | boolean | If true, returns only the total count | false |
Column Selection
| Parameter | Type | Description |
|---|---|---|
columns | string | Comma-separated column names to return. Use * for all columns. See Available Columns for the full list. |
Search
| Parameter | Type | Description |
|---|---|---|
searchQuery | string | Fuzzy search across deal names |
Filters
All filters from the bulk export endpoint are supported. Filters are passed as query parameters with JSON-encoded values for arrays and objects.Deal Identification
| Filter | Type | Description | Example |
|---|---|---|---|
ids | string | JSON array of specific deal IDs | ["deal_123","deal_456"] |
owner_ids | string | JSON array of owner IDs | ["user_abc"] |
owner_filter_type | string | Filter type for owners | is any of |
collaborators | string | JSON array of collaborator IDs | ["user_def"] |
collaborator_filter_type | string | Filter type for collaborators | is any of |
Deal Attributes
| Filter | Type | Description | Example |
|---|---|---|---|
status | string | JSON array of deal stages | ["Closed Won","Closed Lost"] |
status_filter_type | string | Filter type | is any of |
deal_type | string | JSON array of deal types | ["New Business","Expansion"] |
deal_type_filter_type | string | Filter type | is any of |
region | string | JSON array of regions | ["North America","EMEA"] |
region_filter_type | string | Filter type | is any of |
industry | string | JSON array of industries | ["Technology","Healthcare"] |
industry_filter_type | string | Filter type | is any of |
product_labels | string | JSON array of product IDs | ["prod_123"] |
product_filter_type | string | Filter type | is any of | include all of |
Date & Amount
| Filter | Type | Description | Example |
|---|---|---|---|
close_date | string | JSON object with date range | {"from":"2026-01-01","to":"2026-03-31"} |
amount | string | JSON object with min/max | {"min":10000,"max":100000} |
Competitive Intelligence
| Filter | Type | Description | Example |
|---|---|---|---|
competitor | string | JSON array of competitor IDs | ["comp_123"] |
competitor_filter_type | string | Filter type | is any of |
any_competitor | string | JSON array: ["true"] or ["false"] | ["true"] |
Analysis
| Filter | Type | Description | Example |
|---|---|---|---|
deal_analyzed | string | JSON array: ["true"] or ["false"] | ["true"] |
analysis_verified | string | JSON array: ["true"] or ["false"] | ["true"] |
Win-Loss Scores
Filters for deal analysis scores (range queries):| Filter | Format | Example |
|---|---|---|
wl_product_fit_score | {"min": number, "max": number} | {"min":3,"max":5} |
wl_sales_execution_score | {"min": number, "max": number} | {"min":3,"max":5} |
wl_relationship_score | {"min": number, "max": number} | {"min":3,"max":5} |
wl_price_sensitivity_score | {"min": number, "max": number} | {"min":1,"max":3} |
wl_competitive_intensity_score | {"min": number, "max": number} | {"min":3,"max":5} |
wl_customer_fit_score | {"min": number, "max": number} | {"min":3,"max":5} |
wl_messaging_fit_score | {"min": number, "max": number} | {"min":3,"max":5} |
wl_messaging_accuracy_score | {"min": number, "max": number} | {"min":3,"max":5} |
CRM Filters (Advanced)
| Filter | Type | Description | Example |
|---|---|---|---|
salesforce_filters | string | JSON array of Salesforce filter objects | See CRM Filters |
hubspot_filters | string | JSON array of HubSpot filter objects | See CRM Filters |
Segments
| Filter | Type | Description | Example |
|---|---|---|---|
segment | string | JSON array of segment IDs | ["seg_123","seg_456"] |
segment_filter_type | string | is any of | include all of | is any of |
Sorting
| Parameter | Type | Description | Default |
|---|---|---|---|
sort | string | Column name to sort by | created_at |
sort_order | string | asc or desc | desc |
created_at- Creation dateproposal_due- Expected/actual close dateamount- Deal valuename- Deal namewl_product_fit_score- Product fit scorewl_sales_execution_score- Sales execution scorewl_relationship_score- Relationship scorewl_price_sensitivity_score- Price sensitivity scorewl_competitive_intensity_score- Competitive intensity scorewl_customer_fit_score- Customer fit scorewl_messaging_fit_score- Messaging fit scorewl_messaging_accuracy_score- Messaging accuracy score
Response Format
Standard Response
Returns an array of deal objects with all requested fields:Count Response
Whencount=true, returns only the total count:
CRM Filters
For advanced filtering using CRM-specific properties:is,is notis greater than,is less thanis greater than or equal to,is less than or equal tois before,is after(for dates)contains,does not contain(for text)
Rate Limits
| Plan | Requests per Minute |
|---|---|
| Essentials | 60 |
| Growth | 300 |
| Enterprise | 1,000 |
Examples
Best Practices
- Use Pagination: Always paginate through large datasets rather than requesting all at once
- Select Columns: Use the
columnsparameter to only fetch fields you need - Cache Counts: If you need counts frequently, cache them with appropriate TTL
- Filter Server-Side: Apply filters in the API request rather than fetching all data and filtering client-side
- Handle Rate Limits: Implement exponential backoff when you receive 429 responses
- Use Bulk Export for Large Datasets: If you need to analyze thousands of deals, use the bulk export endpoint instead
Comparison: Get Deals vs Bulk Export
| Feature | GET /deals | POST /deals/export |
|---|---|---|
| Response Format | JSON | CSV |
| Response Time | Immediate | 2-3 minutes |
| Use Case | Real-time access, integrations | Reports, analysis, backups |
| Pagination | Built-in | N/A (single file) |
| Max Records | Unlimited (paginated) | Unlimited |
| Rate Limits | 60-1000 req/min | 5-100 exports/hour |
| Data Freshness | Real-time | Snapshot at export time |
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid request (e.g., invalid filter format, invalid column name) |
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Authorizations
API key from Hindsight dashboard
Query Parameters
Number of deals per page
x <= 100Zero-based page index
If true, returns only the total count
Column to sort by
created_at, updated_at, close_date, amount, name Sort direction
asc, desc Comma-separated list of columns to return
Fuzzy search across deal names
JSON array of deal stages
JSON array of owner IDs
JSON object: {"from": "2026-01-01", "to": "2026-03-31"}
JSON object: {"min": 10000, "max": 100000}
Response
Successful response
Hindsight deal ID
"deal_123"
Deal name
"Acme Corp - Enterprise License"
Deal value
50000
Current deal stage ID
"negotiation"
Previous deal stage ID
"qualification"
Expected or actual close date
"2026-03-15"
Deal creation timestamp
Deal owner ID
Salesforce Opportunity ID
HubSpot Deal ID
Whether deal has been analyzed
Whether analysis has been verified
Type of deal
"New Business"
Geographic region
Array of competitor associations
Array of deal drivers/reasons
Product fit score (1-5)
Sales execution score (1-5)
Relationship score (1-5)
