DEV Community

Pulsebit News Sentiment API
Pulsebit News Sentiment API

Posted on

Your Pipeline Is 24.5h Behind: Catching Blockchain Sentiment Leads with Pulsebit

Your Pipeline Is 24.5h Behind: Catching Blockchain Sentiment Leads with Pulsebit

We just discovered a striking anomaly: a 24-hour momentum spike of -0.200 in blockchain sentiment. This isn't just another blip; it signifies a notable shift in sentiment around blockchain technology, particularly with events like the upcoming Peru Blockchain Conference in 2026. With the leading language being English, we can see how narratives are forming in this space, driven by key articles that cluster around shared themes.

Now, let’s talk about the implications of this anomaly. If your model isn't adept at handling multilingual origins or recognizing entity dominance, it likely missed this critical insight by a staggering 24.5 hours. That’s a long time to be out of the loop, especially when the leading entity, in this case, focuses on blockchain themes. If you're relying solely on models that treat sentiment uniformly across languages or overlook emerging narratives, you're placing yourself at a disadvantage.

English coverage led by 24.5 hours. Ca at T+24.5h. Confidenc
English coverage led by 24.5 hours. Ca at T+24.5h. Confidence scores: English 0.95, Spanish 0.95, French 0.95 Source: Pulsebit /sentiment_by_lang.

To help you catch these insights, here’s a Python snippet that can pull this information using our API. We filter the data to focus on the English language and the relevant topic, and we also score the narrative itself.

import requests

![Left: Python GET /news_semantic call for 'blockchain'. Right](https://pub-c3309ec893c24fb9ae292f229e1688a6.r2.dev/figures/g3_code_output_split_1784070108518.png)
*Left: Python GET /news_semantic call for 'blockchain'. Right: returned JSON response structure (clusters: 3). Source: Pulsebit /news_semantic.*


# Define parameters
topic = 'blockchain'
score = +0.550
confidence = 0.95
momentum = -0.200
lang = 'en'

# Geographic origin filter
response = requests.get(
    f'https://api.pulsebit.com/v1/sentiment?topic={topic}&lang={lang}&momentum={momentum}'
)
data = response.json()

![Geographic detection output for blockchain. France leads wit](https://pub-c3309ec893c24fb9ae292f229e1688a6.r2.dev/figures/g3_geo_output_1784070108611.png)
*Geographic detection output for blockchain. France leads with 1 articles and sentiment +0.75. Source: Pulsebit /news_recent geographic fields.*


# Meta-sentiment moment
cluster_reason = "Clustered by shared themes: best, user-centric, crypto, wallets, hide."
meta_response = requests.post(
    'https://api.pulsebit.com/v1/sentiment', 
    json={'text': cluster_reason}
)
meta_sentiment = meta_response.json()

print(data)
print(meta_sentiment)
Enter fullscreen mode Exit fullscreen mode

In this code, we first query the sentiment for the blockchain topic filtered by English, allowing us to hone in on the relevant discussions. We then take the cluster reason string and run it back through our sentiment scoring endpoint. This dual approach provides a comprehensive view of the narrative framing and its current sentiment score.

So, what can you build with this newfound insight? Here are three actionable ideas:

  1. Sentiment Alerts: Set up an alert system using the momentum value. For example, if momentum < -0.150, trigger a notification to your team. This allows you to react in real-time to significant sentiment shifts.

  2. Geo-Targeted Insights: Use the geographic origin filter to create a dashboard that highlights sentiment changes in different regions. For instance, when sentiment for the topic "blockchain" drops below +0.300 in English, it could indicate a regional sentiment shift worth investigating further.

  3. Cluster Analysis Tool: Implement a tool that analyzes narratives based on the meta_sentiment scores. Focus on forming themes like blockchain(+0.00), google(+0.00), and global(+0.00) to create content strategies that align with user-centric trends. When your meta sentiment score drops below +0.400, it may be time to revisit your messaging.

Ready to dive in? Check out our documentation: pulsebit.lojenterprise.com/docs. You can copy-paste the above code and run it in under 10 minutes. Don't let your pipeline lag behind—stay ahead of the curve with these insights.

Top comments (0)