Streams API Introduction
The Streams API provides powerful content fetching capabilities for accessing your organization's published content including posts, articles, short videos, and promotional campaigns. Built on GraphQL with auto-generated TypeScript clients, it enables seamless integration of dynamic content into your websites and applications.
What is the Streams API?
The Streams API is a GraphQL-based content delivery system that allows you to:
- Fetch Published Content: Access all your organization's published posts, articles, and media
- Multiple Content Types: Support for regular posts, short videos, articles, events, and more
- Advanced Filtering: Filter by content type, content lists, search queries, and publication status
- Auto-Generated Clients: Get type-safe TypeScript clients automatically generated through Web Studio
- Rich Media Support: Handle images, videos, and media with tags, metadata, and thumbnails
- Campaign Integration: Access promotional campaigns and ads for marketing websites
Key Features
Comprehensive Content Types
Access various content formats including:
- Regular Posts: Standard social-style posts with media and text
- Short Videos: Vertical video content optimized for mobile
- Articles: Long-form structured content with rich layouts
- Events: Time-based content with location and scheduling data
- Audio Posts: Audio content with metadata
- Link Posts: External link previews with rich metadata
Content Organization
- Content Lists: Curated collections of content for specific purposes
- Site-Scoped Content: Content filtered by specific sites and organizations
- Publication Status: Access only published, draft, or scheduled content
- Search Capabilities: Full-text search across all content types
Rich Media Features
- Product Tags: Shoppable content with product information and positioning
- User Tags: Social tagging with user profiles and positioning
- Media Page Tags: Cross-promotional tagging between media pages
- Asset Management: Optimized image and video delivery with multiple scales
Campaign & Advertising
- Ad Campaigns: Access promotional campaigns and ad groups
- Ad Placement: Retrieve ads for specific placements on your sites
- Campaign Analytics: Track campaign performance and status
Use Cases
The Streams API is perfect for:
- News Websites: Dynamic news feeds with articles and multimedia content
- Marketing Sites: Landing pages with curated content and campaigns
- E-commerce Integration: Product-tagged content for social commerce
- Mobile Applications: Content feeds optimized for mobile consumption
- Campaign Sites: Promotional websites with targeted content and advertising
Architecture Overview
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Your Site │ │ Streams API │ │ Content │
│ │ │ │ │ Platform │
│ ┌─────────────┐ │ │ ┌──────────────┐ │ │ │
│ │ Generated │─┼────┼─│ GraphQL │─┼────┤ • Posts │
│ │ TypeScript │ │ │ │ Endpoint │ │ │ • Articles │
│ │ Client │ │ │ │ │ │ │ • Media │
│ └─────────────┘ │ │ └──────────────┘ │ │ • Campaigns │
└─────────────────┘ └──────────────────┘ └─────────────────┘
Content Structure
Posts
Posts are the primary content type, with support for multiple formats:
- Media Data: Images and videos with rich metadata
- Text Content: Formatted text with various styling options
- Product Integration: Shoppable tags with pricing and links
- Social Features: User tagging and cross-promotion
- Metadata: View counts, publication dates, and source information
Articles
Structured long-form content with:
- Section-Based Layout: Modular content sections
- Rich Media Fields: Images, videos, galleries, and text
- Custom Styling: Configurable padding, spacing, and formatting
- SEO Optimization: Structured data and metadata
Content Lists
Curated collections that enable:
- Campaign Organization: Group content by themes or campaigns
- Editorial Curation: Hand-picked content collections
- Dynamic Updates: Content automatically updates as new items are added
Getting Started
Ready to start using the Streams API? Check out our Getting Started Guide to:
- Generate your TypeScript client through Web Studio
- Configure your organization and site settings
- Make your first API calls
- Implement content filtering and search
- Handle rich media and product tags
Performance & Caching
The Streams API includes built-in performance optimizations:
- CDN Delivery: Global content delivery for fast loading
- Image Optimization: Multiple image scales and formats
- Caching Support: Client-side and server-side caching headers
- Efficient Queries: GraphQL fragments for optimized data fetching
Next Steps
- Getting Started Guide - Step-by-step setup and implementation