Skip to main content

Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter)

Project description

Upload-Post SDK for Python

Official Python client for the Upload-Post API - Cross-platform social media upload.

Upload videos, photos, text posts, and documents to TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter) with a single API.

Installation

pip install upload-post

Quick Start

from upload_post import UploadPostClient

client = UploadPostClient("YOUR_API_KEY")

# Upload a video to multiple platforms
response = client.upload_video(
    "video.mp4",
    title="Check out this awesome video! 🎬",
    user="my-profile",
    platforms=["tiktok", "instagram", "youtube"]
)

print(response)

Features

  • Video Upload - TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Bluesky, X
  • Photo Upload - TikTok, Instagram, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, X
  • Text Posts - X, LinkedIn, Facebook, Threads, Reddit, Bluesky
  • Document Upload - LinkedIn (PDF, PPT, PPTX, DOC, DOCX)
  • Scheduling - Schedule posts for later
  • Posting Queue - Add posts to your configured queue
  • First Comments - Auto-post first comment after publishing
  • Analytics - Get engagement metrics
  • Full Type Hints

API Reference

Upload Video

response = client.upload_video(
    "video.mp4",
    title="My awesome video",
    user="my-profile",
    platforms=["tiktok", "instagram", "youtube"],
    
    # Optional: Schedule for later
    scheduled_date="2024-12-25T10:00:00Z",
    timezone="Europe/Madrid",
    
    # Optional: Add first comment
    first_comment="Thanks for watching! 🙏",
    
    # Optional: Platform-specific settings
    privacy_level="PUBLIC_TO_EVERYONE",  # TikTok
    media_type="REELS",  # Instagram
    privacyStatus="public",  # YouTube
    tags=["tutorial", "coding"],  # YouTube
)

Upload Photos

# Upload single or multiple photos
response = client.upload_photos(
    ["photo1.jpg", "photo2.jpg", "https://example.com/photo3.jpg"],
    title="Check out these photos! 📸",
    user="my-profile",
    platforms=["instagram", "facebook", "x"],
    
    # Optional: Add to queue instead of posting immediately
    add_to_queue=True,
    
    # Platform-specific
    media_type="IMAGE",  # Instagram: IMAGE or STORIES
    facebook_page_id="your-page-id",
)

Upload Text Posts

response = client.upload_text(
    title="Just shipped a new feature! 🚀 Check it out at example.com",
    user="my-profile",
    platforms=["x", "linkedin", "threads"],
    
    # Optional: Create a poll on X
    poll_options=["Option A", "Option B", "Option C"],
    poll_duration=1440,  # 24 hours in minutes
    
    # Optional: Post to a LinkedIn company page
    target_linkedin_page_id="company-page-id",
)

Upload Documents (LinkedIn)

response = client.upload_document(
    "presentation.pdf",
    title="Q4 2024 Report",
    user="my-profile",
    description="Check out our latest quarterly results!",
    visibility="PUBLIC",
    target_linkedin_page_id="company-page-id",  # Optional: post to company page
)

Check Upload Status

For async uploads, check the status using the request_id:

status = client.get_status("request_id_from_upload")
print(status)

For scheduled or queued posts, check the status using the job_id:

status = client.get_job_status("job_id_from_scheduled_post")
print(status)

Get Upload History

history = client.get_history(page=1, limit=20)
print(history)

Scheduled Posts

# List all scheduled posts
scheduled = client.list_scheduled()

# Edit a scheduled post
client.edit_scheduled(
    "job-id",
    scheduled_date="2024-12-26T15:00:00Z",
    timezone="America/New_York",
)

# Cancel a scheduled post
client.cancel_scheduled("job-id")

User Management

# List all profiles
users = client.list_users()

# Create a new profile
client.create_user("new-profile")

# Delete a profile
client.delete_user("old-profile")

# Generate JWT for platform integration (white-label)
jwt = client.generate_jwt(
    "my-profile",
    redirect_url="https://yourapp.com/callback",
    platforms=["tiktok", "instagram"],
)

Get Analytics

analytics = client.get_analytics(
    "my-profile",
    platforms=["instagram", "tiktok"],
)
print(analytics)

Helper Methods

# Get Facebook pages for a profile
fb_pages = client.get_facebook_pages("my-profile")

# Get LinkedIn pages for a profile
li_pages = client.get_linkedin_pages("my-profile")

# Get Pinterest boards for a profile
boards = client.get_pinterest_boards("my-profile")

Platform-Specific Options

TikTok (Video)

  • privacy_level - PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY
  • disable_duet - Disable duet
  • disable_comment - Disable comments
  • disable_stitch - Disable stitch
  • cover_timestamp - Timestamp in ms for cover
  • is_aigc - AI-generated content flag
  • post_mode - DIRECT_POST or MEDIA_UPLOAD
  • brand_content_toggle - Branded content toggle
  • brand_organic_toggle - Brand organic toggle

TikTok (Photos)

  • auto_add_music - Auto add music
  • photo_cover_index - Index of photo for cover (0-based)
  • disable_comment - Disable comments

Instagram

  • media_type - REELS, STORIES, IMAGE
  • share_to_feed - Share to feed (for Reels/Stories)
  • collaborators - Comma-separated collaborator usernames
  • cover_url - Custom cover URL
  • audio_name - Audio track name
  • user_tags - Comma-separated user tags
  • location_id - Location ID
  • thumb_offset - Thumbnail offset

YouTube

  • tags - List or comma-separated tags
  • categoryId - Category ID (default: "22" People & Blogs)
  • privacyStatus - public, unlisted, private
  • embeddable - Allow embedding
  • license - youtube, creativeCommon
  • publicStatsViewable - Show public stats
  • thumbnail_url - Custom thumbnail URL
  • selfDeclaredMadeForKids - Made for kids (COPPA)
  • containsSyntheticMedia - AI/synthetic content flag
  • defaultLanguage - Title/description language (BCP-47)
  • defaultAudioLanguage - Audio language (BCP-47)
  • allowedCountries / blockedCountries - Country restrictions
  • hasPaidProductPlacement - Paid placement flag
  • recordingDate - Recording date (ISO 8601)

LinkedIn

  • visibility - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
  • target_linkedin_page_id - Page ID for organization posts

Facebook

  • facebook_page_id - Facebook Page ID (required)
  • video_state - PUBLISHED, DRAFT
  • facebook_media_type - REELS, STORIES, or VIDEO (normal page video)
  • thumbnail_url - Thumbnail URL for normal page videos (only when facebook_media_type is VIDEO)
  • facebook_link_url - URL for text posts

Pinterest

  • pinterest_board_id - Board ID
  • pinterest_link - Destination link
  • pinterest_alt_text - Alt text for photos
  • pinterest_cover_image_url - Cover image URL (video)
  • pinterest_cover_image_key_frame_time - Key frame time in ms

X (Twitter)

  • reply_settings - everyone, following, mentionedUsers, subscribers, verified
  • nullcast - Promoted-only post
  • tagged_user_ids - User IDs to tag
  • place_id / geo_place_id - Location place ID
  • quote_tweet_id - Tweet ID to quote
  • poll_options - Poll options (2-4)
  • poll_duration - Poll duration in minutes (5-10080)
  • for_super_followers_only - Exclusive for super followers
  • community_id - Community ID
  • share_with_followers - Share community post with followers
  • card_uri - Card URI for Twitter Cards
  • x_long_text_as_post - Post long text as single post
  • x_thread_image_layout - Comma-separated image layout for thread (e.g. "4,4" or "2,3,1"). Each value 1-4, total must equal image count. Auto-chunks into groups of 4 when >4 images.

Threads

  • threads_long_text_as_post - Post long text as single post (vs thread)
  • threads_thread_media_layout - Comma-separated list of how many media items to include in each Threads post (e.g. "5,5" or "3,4,3"). Each value 1-10, total must equal media count. Auto-chunks into groups of 10 when >10 items.
  • threads_topic_tag - Topic tag for the Threads post (1-50 characters, no periods or ampersands). One tag per post. Helps increase reach.

Reddit

  • subreddit - Subreddit name (without r/)
  • flair_id - Flair template ID

Common Options

These options work across all upload methods:

Option Description
title Post title/caption (required)
user Profile name (required)
platforms Target platforms list (required)
first_comment First comment to post
alt_text Alt text for accessibility
scheduled_date ISO date for scheduling
timezone Timezone for scheduled date
add_to_queue Add to posting queue
max_posts_per_slot Max posts per queue slot (overrides profile setting)
async_upload Process asynchronously (default: True)

Error Handling

from upload_post import UploadPostClient, UploadPostError

client = UploadPostClient("YOUR_API_KEY")

try:
    response = client.upload_video("video.mp4", **options)
    print("Upload successful:", response)
except UploadPostError as e:
    print("Upload failed:", str(e))

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upload_post-2.1.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upload_post-2.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file upload_post-2.1.1.tar.gz.

File metadata

  • Download URL: upload_post-2.1.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for upload_post-2.1.1.tar.gz
Algorithm Hash digest
SHA256 1542565cadff6aaf5d0f14ec8ba2246cbdd503355f574e8da2d271daa70aa440
MD5 3eb8d4b9788063b5f40d1aaf7d70d10d
BLAKE2b-256 4c78d8b99ae41a843c05089e8b0a7df745cbd6b4cee06061b6d73e409ea31859

See more details on using hashes here.

Provenance

The following attestation bundles were made for upload_post-2.1.1.tar.gz:

Publisher: publish.yml on Upload-Post/upload-post-pip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file upload_post-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: upload_post-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for upload_post-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ae279564d4d674667bc91d51520c9987fe8d20cbe664d591d327f8e0a8129b5
MD5 7fd1252b0dfbd0d98ba2b0f9e90cb0f8
BLAKE2b-256 65353546e017ba024e0a98fd4af1d5758d7b5cbedeef6a3a17859f42bd4b8bb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for upload_post-2.1.1-py3-none-any.whl:

Publisher: publish.yml on Upload-Post/upload-post-pip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page