The ID of the project to for records within
Constellation
An API for understanding online narratives, the posts that make them, and the actors who shape them
The Constellation API provides endpoints that let you analyze social posts, the accounts behind them, and the narratives connecting them. Using advanced AI, the API organizes raw social data into structured insights—showing what is being said, who is amplifying it, how it is propagating across platforms, and what potential risks it may pose to your organization.
The Posts endpoint returns post-level content such as text, author information, engagement metadata, and AI-generated enrichments including risk metrics and narrative identifiers. The Authors endpoint provides account-level context, including cohort membership and other actor-intelligence indicators. The Narratives endpoint returns clusters of related content, an AI-generated assessment of potential risk, a narrative summary, and a description of the narrative itself.
This API is ideal for customers who want to embed Constellation enrichments directly into their own products, dashboards, or analytical workflows.
Query, sort, and pagination criteria.
Cursor-Based Pagination:
- For the first page, omit the
afterfield or set it tonull - Use the
endCursorvalue from the previous response'spageInfoas theaftervalue for the next page - The cursor is an identifier to the last row in the previous page
- Example cursor:
eyJjcmVhdGVkQXQiOiIyMDI1LTA4LTI3VDIwOjQ4OjI4LjAwMFoiLCJwb3N0SWQiOiIxOTYwODA2NjQyMjE3NTc0NTAyIn0=
Pagination Flow:
- First request:
{ "query": {...}, "page": { "first": 50 } } - Response includes:
pageInfo.endCursor - Next request:
{ "query": {...}, "page": { "first": 50, "after": "<endCursor from previous>" } }
A lucene query to filter on post criteria. Provides the same intent as query, but more text-friendly way of specifying the filter. If both boolean and query are provided, they are combined with a logical AND.
- https://api-prd.infra-prod.blackbird.ai/v1/posts/-/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api-prd.infra-prod.blackbird.ai/v1/posts/-/search?projectId=string' \
-H 'Content-Type: application/json' \
-d '{
"query": {
"bool": {
"must": [
{
"range": {
"createdAt": {
"gte": "2025-01-01T00:00:00Z",
"lte": "2025-11-05T23:59:59Z"
}
}
}
],
"should": [
{
"term": {
"platform": "twitter"
}
},
{
"term": {
"platform": "reddit"
}
}
]
}
},
"sort": [
{
"field": "createdAt",
"direction": "DESC"
},
{
"field": "postId",
"direction": "ASC"
}
],
"page": {
"first": 50,
"after": "eyJwb3N0SWQiOiIxOTYwODA2NjQyMjE3NTc0NTAyIiwiY3JlYXRlZEF0IjoiMjAyNS0wOC0yN1QyMDo0ODoyOC4wMDBaIn0="
}
}'Search across all author text fields - author.username, author.displayName, author.description, author.location. NOTE - Not actually returned as a field in the response, but documented here to facilitate describing the filterability.
Search across all narrative text fields - narrative.title, narrative.compassHeadline, narrative.compassSummary, narrative.compassOneSentence, narrative.executiveBriefing. NOTE - Not actually returned as a field in the response, but documented here to facilitate describing the filterability.
Search across all post text content fields - title, body. NOTE - Not actually returned as a field in the response, but documented here to facilitate describing the filterability.
The timestamp when the post was created.
The platform where the post originated (e.g., Twitter, Reddit, Telegram).
The main text content of the post. Not exposed for twitter or reddit posts. Use the postUrl to get it.
The title of the post (e.g., for Reddit submissions or articles). Not exposed for twitter or reddit posts. Use the postUrl to get it.
{ "posts": [ { … } ], "pageInfo": { "hasNextPage": true, "endCursor": "eyJjcmVhdGVkQXQiOiIyMDI1LTA4LTI3VDAxOjAwOjEyLjAwMFoiLCJwb3N0SWQiOiIxOTYwNTA3NjA3Njg2MjA1ODc5In0=", "sortKey": "created_at DESC, post_id ASC" } }