Documentation Index
Fetch the complete documentation index at: https://x-preview-mintlify-a8a065c0.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint has been updated to include Post edit metadata. Learn more about these metadata on the “Edit Posts” fundamentals page.
Decahose stream
Enterprise This is an enterprise API available within our managed access levels only. To use this API, you must first set up an account with our enterprise sales team. Learn more The Decahose delivers a 10% random sample of the realtime X Firehose through a streaming connection. This is accomplished via a realtime sampling algorithm which randomly selects the data, while still allowing for the expected low-latency delivery of data as it is sent through the firehose by X. Below are some of the features available with Decahose:- Expanded and enhanced URLs: - fully unwinds shortened URLs and provides additional metadata (page title and description)
- Stream partitioning - 2 partitions, each containing 50% of volume of the Decahose stream
- Enhanced reliability - geographic diversity of backend systems
ENTERPRISE
Streaming likes
This is an enterprise API available within our managed access levels only. To use this API, you must first set up an account with our enterprise sales team. Learn more Likes enable insight into who likes Posts and delivers accurate counts of likes. Gnip’s Firehose and Decahose can deliver public likes related to the Posts delivered via Gnip. This yields real-time public engagement and audience metrics associated with a Post. Getting started with Likes As you prepare to consume likes data, you should know that:- Likes are delivered via an independent, separate stream
- Likes are historically referred to as “Favorites”. The enriched native format payload maintains this nomenclature
- Streams include only public likes
- Public means that the liking user, Post creator and Post are all public on the platform
- Likes are very similar to Retweets and represent a public signal of engagement
- Payload elements include:
- Original Post object
- Actor object that created the original Post
- Actor object that performed the like action
- Only original content can be liked
- Retweets cannot be liked. A like of a Retweet is applied to the original Post
- Quoted Tweets can be liked
- Like activities include applicable Gnip Enrichments (where purchased/applied)
- Supported Products / Features
- Likes streams support Backfill (where purchased/applied)
- There is no Replay support for likes streams
- There is no Search or Historical support for likes
- There are no immediate plans to add likes support to PowerTrack
- For the 10% sample Posts delivered in the Decahose, stream includes 100% of the applicable public likes
- Partitions: 2
- URL Structure
Guides
Recovery and Redundency
Introduction With streaming high volumes of realtime Posts comes a set of best practices that promote both data reliability and data full-fidelity. When consuming realtime data, maximizing your connection time is a fundamental goal. When disconnects occur, it is important to automatically detect that and reconnect. After reconnecting it’s important to assess if there are any periods to backfill data for. The component that manages these details and consumes realtime Posts is only one part of a system with network, datastore, server, and storage concerns. Given the complexity of these systems, another best practice is to have different streaming environments, with at least separate streams for development/testing and production. Decahose comes with a set of features that help with these efforts.- To support multiple environments, we can deploy Additional Streams for your account. These streams are independent of each other and have a different stream_label to help differentiate them.
- To help support maintaining a connection, each Decahose stream supports Redundant Connections. The most common architecture is for a stream to have two connections, and on the client-side there are two independent consumers –ideally on different networks. With this design, there can be redundancy across the client-side networks, servers, and datastore pathways. Note that a full-copy of the data is served on each connection and the client-side must be tolerant of and manage duplicate data.
- A ‘heartbeat’ will be provided every 10 seconds; however, with the Decahose stream, the volume of data is high enough that even a small duration (e.g., a few seconds) of no Posts can indicate a connection issue. Therfore, both a ‘data silence’ and lack of a heartbeat can be used to detect a disconnect.