Skip to content

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.

Download OpenAPI description
Languages
Servers
https://api-prd.infra-prod.blackbird.ai/v1/

Project

Operations

Posts

Operations

Narratives

Operations

Search for narratives

Request

The Narratives endpoint allows you to fetch clusters of related content that Constellation has grouped into coherent narratives. Each narrative includes an AI-generated summary, a description, and an assessment of the claim.

Query
projectIdstringrequired

Project ID to fetch narratives for

Bodyapplication/jsonrequired

Elasticsearch-style filter (and boolean query), sort, and pagination criteria.

queryobject(NarrativesSearchRequestDto__schema0)
Any of:
booleanstring

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.

sortArray of objects

A list of fields to sort by.

pageobject

Pagination information.

Default {"first":50}
curl -i -X POST \
  'https://api-prd.infra-prod.blackbird.ai/v1/narratives/-/search?projectId=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "boolean": "platform:twitter OR platform:reddit",
    "query": {
      "bool": {
        "must": [
          {
            "match_phrase": {
              "narrative.title": {
                "query": "Iranian"
              }
            }
          },
          {
            "range": {
              "narrative.weightedRiskScore": {
                "gte": 54
              }
            }
          }
        ]
      }
    },
    "sort": [
      {
        "field": "narrative.weightedRiskScore",
        "direction": "DESC"
      }
    ],
    "page": {
      "first": 50
    }
  }'

Responses

Bodyapplication/json
narrativesArray of objectsrequired
Example: [{"compassHeadline":"The expulsion of Iran's ambassador was based on credible security concerns, but the claim's language includes subjective interpretation.","compassLabel":"Caution","compassOneSentence":"The expulsion of Iran's ambassador was based on credible security concerns, but the claim's language includes subjective interpretation.","compassSummary":"The expulsion of Iran's ambassador was based on credible security concerns, but the claim's language includes subjective interpretation.","executiveBriefing":"The expulsion of the Iranian ambassador by Australia has led to significant online discourse, with users expressing mixed feelings about the timing and necessity of the action. Prominent voices criticized the delay in addressing threats from the Iranian regime, particularly following antisemitic incidents. The conversation was largely driven by right-wing users advocating for stronger measures against Iranian influence.","postCount":398,"title":"The expulsion of the Iranian ambassador is seen as a delayed but necessary response to long-known threats from the Iranian regime.","totalEngagement":7713,"narrativeId":"107"}]
narratives[].​compassHeadlinestring

Compass-generated headline for the narrative.

Example: "The expulsion of Iran's ambassador was based on credible security concerns, but the claim's language includes subjective interpretation."
narratives[].​compassLabelstring

Compass-assigned label for the narrative.

Example: "Caution"
narratives[].​compassOneSentencestring

Compass-generated one-sentence summary.

Example: "The expulsion of Iran's ambassador was based on credible security concerns, but the claim's language includes subjective interpretation."
narratives[].​compassSummarystring

Compass-generated summary of the narrative.

Example: "The expulsion of Iran's ambassador was based on credible security concerns, but the claim's language includes subjective interpretation."
narratives[].​dailyHistogramArray of objects

Daily histogram.

narratives[].​executiveBriefingstring

Executive briefing text for the narrative.

Example: "The expulsion of the Iranian ambassador by Australia has led to significant online discourse, with users expressing mixed feelings about the timing and necessity of the action. Prominent voices criticized the delay in addressing threats from the Iranian regime, particularly following antisemitic incidents. The conversation was largely driven by right-wing users advocating for stronger measures against Iranian influence."
narratives[].​hourlyHistogramArray of objects

Hourly histogram.

narratives[].​postCountnumber

Total number of posts in the narrative.

Example: 398
narratives[].​titlestring

Title of the narrative the post belongs to.

Example: "The expulsion of the Iranian ambassador is seen as a delayed but necessary response to long-known threats from the Iranian regime."
narratives[].​totalEngagementnumber

Total engagement across all posts in the narrative.

Example: 7713
narratives[].​uniqueAuthorsnumber

Count of unique authors in the narrative.

narratives[].​weightedRiskScorenumber

Weighted risk score for the narrative.

narratives[].​narrativeIdstring

The unique identifier for the narrative.

Example: "107"
pageInfoobjectrequired
Example: {"hasNextPage":true,"endCursor":"eyJjcmVhdGVkQXQiOiIyMDI1LTA4LTI3VDAxOjAwOjEyLjAwMFoiLCJwb3N0SWQiOiIxOTYwNTA3NjA3Njg2MjA1ODc5In0=","sortKey":"created_at DESC, post_id ASC"}
pageInfo.​hasNextPagebooleanrequired
Example: true
pageInfo.​endCursorstring
Example: "eyJjcmVhdGVkQXQiOiIyMDI1LTA4LTI3VDAxOjAwOjEyLjAwMFoiLCJwb3N0SWQiOiIxOTYwNTA3NjA3Njg2MjA1ODc5In0="
pageInfo.​totalCountnumber
pageInfo.​sortKeystring
Example: "created_at DESC, post_id ASC"
Response
application/json
{ "narratives": [ {} ], "pageInfo": { "hasNextPage": true, "endCursor": "eyJjcmVhdGVkQXQiOiIyMDI1LTA4LTI3VDAxOjAwOjEyLjAwMFoiLCJwb3N0SWQiOiIxOTYwNTA3NjA3Njg2MjA1ODc5In0=", "sortKey": "created_at DESC, post_id ASC" } }