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.

All boolean and query searches are beta. They are intended to mirror a subset of the ElasticSearch DSL spec, but the current implementation is just an approximate. Any change to the functionality which makes it more-correctly implement that spec is considered non-breaking

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

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

The ID of the project to find records within

Bodyapplication/jsonrequired

Query, sort, and pagination criteria.

Cursor-Based Pagination:

  • For the first page, omit the after field or set it to null
  • Use the endCursor value from the previous response's pageInfo as the after value for the next page
  • The cursor is an identifier to the last row in the previous page
  • Example cursor: eyJjcmVhdGVkQXQiOiIyMDI1LTA4LTI3VDIwOjQ4OjI4LjAwMFoiLCJwb3N0SWQiOiIxOTYwODA2NjQyMjE3NTc0NTAyIn0=

Pagination Flow:

  1. First request: { "query": {...}, "page": { "first": 50 } }
  2. Response includes: pageInfo.endCursor
  3. Next request: { "query": {...}, "page": { "first": 50, "after": "<endCursor from previous>" } }
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[].​allAuthorTextstring

Search across all author text fields - author.username, author.displayName, author.profileBio, author.bioLocation. NOTE - Not actually returned as a field in the response, but documented here to facilitate describing the filterability.

narratives[].​allNarrativeTextstring

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.

narratives[].​allPostTextstring

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.

narratives[].​anomalousScorenumber

Behavioral Manipulation score from the BBMI model.

narratives[].​cohortsDistributionobject

Cohort distribution.

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[].​platformDistributionobject

Distribution of posts in the narrative across platforms.

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[].​narrativeIdstringrequired

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" } }
Operations