Cloverleaf Search API (1.0.0)

Download OpenAPI specification:

Cloverleaf Search API running on a python FastAPI server

Search

Search for meetings based on search terms and filter parameters.

Authorizations:
api_key
query Parameters
search-terms
Array of strings
must-include-terms
Array of strings
date-range
required
Array of integers
campaign-id
integer
count
integer
Default: 25
page
integer
Default: 1
sort-by
string
Default: "hits"
proximity
integer
exclude
string
use-territory
boolean
Default: false
filter-params
string
user-id
integer
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "meeting_hits": [
    ],
  • "meetings": [
    ],
  • "total_hits": 0,
  • "total_meeting_hits": 0
}

Campaigns

Returns the campaigns that the user has access to.

Without pagination params the response is the legacy bare array of every campaign. With page and/or per-page (the other defaulting to 1 / 25) it becomes {"campaigns": [...], "total": N, "page": p, "per_page": pp} so callers can fetch large accounts incrementally.

Authorizations:
api_key
query Parameters
page
integer >= 1
per-page
integer [ 1 .. 100 ]
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search By Campaign

Search for meetings based on search terms and filter parameters.

Authorizations:
api_key
path Parameters
campaign_id
required
integer
query Parameters
date-range
Array of integers
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "meeting_hits": [
    ],
  • "meetings": [
    ],
  • "total_hits": 0,
  • "total_meeting_hits": 0
}

Search By Campaign Nls

NLS search scoped to a campaign, using its pre-computed embedding.

Authorizations:
api_key
path Parameters
campaign_id
required
integer
query Parameters
page
integer
Default: 1
per-page
integer
Default: 25
k
integer
Default: 100
date-range
Array of integers
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "already_viewed": { },
  • "meeting_hits": [
    ],
  • "meetings": [
    ],
  • "total_hits": 0,
  • "total_meeting_hits": 0
}

Search Contacts

Lists Contacts in DB with optional filtering by city, county, and state names.

Location parameters support multiple values separated by commas:

  • city_name: "San Francisco, Los Angeles, San Diego"
  • county_name: "Los Angeles County, Orange County"
  • state_name: "California, Nevada, Arizona"
Authorizations:
api_key
query Parameters
offset
integer
Default: 0
limit
integer
Default: 50
organization_id
integer
city_name
string
county_name
string
state_name
string
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search

Count transcript hits for a single term, optionally scoped to the user's territory.

Authorizations:
api_key
query Parameters
term
required
string
use-territory
boolean
Default: false
date-range
required
Array of integers
search-terms
Array of strings
must-include-terms
Array of strings
user-id
integer
filter-params
string
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
0
0

Search

Authorizations:
api_key
query Parameters
use-territory
boolean
Default: false
time-unit
string
Enum: "day" "week" "month"
geography-type
string
Enum: "city" "county" "state"
search-terms
Array of strings
must-include-terms
Array of strings
filter-params
string
date-range
required
Array of integers
user-id
integer
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search Insights

Lists completed paginated insights for a user. The caller's user_organization must match the target user's user_organization or the request is rejected with 403.

Authorizations:
api_key
query Parameters
user_id
required
integer

Filter insights by ai.insights.user_id

date_range
Array of strings <date-time> [ items <date-time > ]

Optional inclusive date window. Both values must be ISO 8601 datetimes. Omit to skip date filtering.

signal_score_threshold
integer

Minimum ai.insights.score; rows below the threshold are excluded

offset
integer >= 0
Default: 0
limit
integer [ 1 .. 200 ]
Default: 50
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Meeting Documents Nls

Natural-language search over meeting document embeddings.

index-name scopes by document_type: meeting-documents -> meeting types, legislation-documents -> legislative types, all-documents -> both.

Authorizations:
api_key
query Parameters
nls-query
required
string non-empty
index-name
string
Enum: "meeting-documents" "legislation-documents" "all-documents"
meeting-document-ids
Array of integers
page
integer
Default: 1
per-page
integer
Default: 25
k
integer
Default: 100
use-territory
boolean
Default: false
filter-params
string
date-range
Array of integers
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "document_hits": [
    ],
  • "total_document_hits": 0,
  • "total_hits": 0
}

Search Meeting

Searches for a meeting transcript based on search terms.

When person_id is provided, restrict to transcripts spoken by that person. The person→voices translation happens here (server-side) so callers don't have to know about per-meeting voice ids, which are an internal artifact that turns over whenever a meeting reprocesses.

Authorizations:
api_key
path Parameters
meeting_id
required
integer
query Parameters
search-terms
required
Array of strings
person-id
integer
title-search-terms
Array of strings
organization-search-terms
Array of strings
proximity
integer
must-have-terms
Array of strings
exclude
string

Responses

Response samples

Content type
application/json
{
  • "terms": [
    ],
  • "total_hits": 0,
  • "transcripts": { }
}

Search Meeting Buffered

Searches for meeting transcripts and returns buffered clips around each hit.

Authorizations:
api_key
path Parameters
meeting_id
required
integer
query Parameters
search-terms
required
Array of strings
buffer
required
integer
voice-ids
Array of integers
title-search-terms
Array of strings
organization-search-terms
Array of strings
proximity
integer
must-have-terms
Array of strings
exclude
string

Responses

Response samples

Content type
application/json
{
  • "buffer_seconds": 0,
  • "clips": [
    ],
  • "total_hits": 0
}

Search Meeting Nls

Natural-language search over transcript embeddings, scoped to a single meeting.

Authorizations:
api_key
path Parameters
meeting_id
required
integer
query Parameters
nls-query
string
k
integer
Default: 100

Responses

Response samples

Content type
application/json
{
  • "best_score": 0,
  • "meeting_id": 0,
  • "total_hits": 0,
  • "transcripts": {
    }
}

Search Meeting Nls Buffered

Natural-language search with buffered clips around each hit.

Accepts zero or more explicit nls-query parameters. When user-id is given, the user's about-derived queries (goals, pain points, competitors, products/services) are added server-side, reusing the sectioned embeddings cloverleaf precomputes into users.about_embeddings; only queries missing a stored vector are batch-embedded, and those are persisted back per section. Each query's kNN results are grouped into clips independently.

Authorizations:
api_key
path Parameters
meeting_id
required
integer
query Parameters
buffer
required
integer
nls-query
Array of strings
k
integer
Default: 100
user-id
integer

Responses

Response samples

Content type
application/json
{
  • "buffer_seconds": 0,
  • "results": [
    ]
}

Search Meeting Transcripts

Returns all transcripts for a meeting.

Authorizations:
api_key
path Parameters
meeting_id
required
integer
query Parameters
user-id
integer
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search Meeting Transcripts V2

Returns all transcripts for a meeting with organization geography and meeting details.

Authorizations:
api_key
path Parameters
meeting_id
required
integer
query Parameters
user-id
integer
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "channel_type_name": "string",
  • "city_geoid": 0,
  • "city_lat": 0,
  • "city_long": 0,
  • "city_name": "string",
  • "county_fips_code": 0,
  • "county_lat": 0,
  • "county_long": 0,
  • "county_name": "string",
  • "meeting_published_at": "2019-08-24T14:15:22Z",
  • "meeting_title": "string",
  • "org_name": "string",
  • "organization_name": "string",
  • "published_at": "2019-08-24T14:15:22Z",
  • "salesforce_account_ids": [ ],
  • "state_name": "string",
  • "title": "string",
  • "transcripts": [
    ]
}

Nls

Natural-language search over transcript embeddings.

Authorizations:
api_key
query Parameters
nls-query
required
string non-empty
page
integer
Default: 1
per-page
integer
Default: 25
k
integer
Default: 100
use-territory
boolean
Default: false
filter-params
string
date-range
Array of integers
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "already_viewed": { },
  • "meeting_hits": [
    ],
  • "meetings": [
    ],
  • "total_hits": 0,
  • "total_meeting_hits": 0
}

Search Opportunities

Authorizations:
api_key
query Parameters
anchor_terms
Array of strings
organizations
Array of strings
cities
Array of strings
count
integer
Default: 25
counties
Array of strings
industry
Array of strings
order
string
Default: "desc"
page
integer
Default: 0
published_after
string
sort
string
Default: "date"
states
Array of strings
terms
Array of strings
channel_types
Array of integers

Responses

Response samples

Content type
application/json
{
  • "opportunities": [
    ],
  • "total": 0
}

Search Promotional

path Parameters
meeting_id
required
integer
query Parameters
search-terms
required
Array of strings
search-type
string
Default: "standard"

Responses

Response samples

Content type
application/json
{
  • "terms": [
    ],
  • "total_hits": 0,
  • "transcripts": { }
}

Purchase Keyword Search

Authorizations:
api_key
query Parameters
search-terms
Array of strings
page
integer
Default: 1
per-page
integer
Default: 25
sort-by
string
Default: "score"
sort-dir
string
Default: "desc"
use-territory
boolean
Default: false
filter-params
string
date-range
Array of integers
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "purchases": [
    ],
  • "total_hits": 0
}

Purchase Nls Search

Authorizations:
api_key
query Parameters
nls-query
required
string non-empty
page
integer
Default: 1
per-page
integer
Default: 25
k
integer
Default: 100
use-territory
boolean
Default: false
filter-params
string
date-range
Array of integers
header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "per_page": 0,
  • "purchases": [
    ],
  • "total_hits": 0
}

Usage Stats

Per-user usage stats for the caller's user_organization: signal delivery/open/click counts, detail views, searches, and campaign subscriptions.

Authorizations:
api_key
query Parameters
start_date
required
string

Inclusive start of the reporting window, as a UTC calendar day (ISO 8601 date, YYYY-MM-DD). Expands to 00:00:00 UTC.

end_date
required
string

Inclusive end of the reporting window, as a UTC calendar day (ISO 8601 date, YYYY-MM-DD). Expands to 23:59:59.999999 UTC.

header Parameters
x-api-key
string
X-Apigateway-Api-Userinfo
string
authorization
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]