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.
pip install upload-postfrom 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)- β 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
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 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",
)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",
)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
)For async uploads, check the status using the request_id:
status = client.get_status("request_id_from_upload")
print(status)history = client.get_history(page=1, limit=20)
print(history)# 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")# 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"],
)analytics = client.get_analytics(
"my-profile",
platforms=["instagram", "tiktok"],
)
print(analytics)# 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")privacy_level- PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLYdisable_duet- Disable duetdisable_comment- Disable commentsdisable_stitch- Disable stitchcover_timestamp- Timestamp in ms for coveris_aigc- AI-generated content flagpost_mode- DIRECT_POST or MEDIA_UPLOADbrand_content_toggle- Branded content togglebrand_organic_toggle- Brand organic toggle
auto_add_music- Auto add musicphoto_cover_index- Index of photo for cover (0-based)disable_comment- Disable comments
media_type- REELS, STORIES, IMAGEshare_to_feed- Share to feed (for Reels/Stories)collaborators- Comma-separated collaborator usernamescover_url- Custom cover URLaudio_name- Audio track nameuser_tags- Comma-separated user tagslocation_id- Location IDthumb_offset- Thumbnail offset
tags- List or comma-separated tagscategoryId- Category ID (default: "22" People & Blogs)privacyStatus- public, unlisted, privateembeddable- Allow embeddinglicense- youtube, creativeCommonpublicStatsViewable- Show public statsthumbnail_url- Custom thumbnail URLselfDeclaredMadeForKids- Made for kids (COPPA)containsSyntheticMedia- AI/synthetic content flagdefaultLanguage- Title/description language (BCP-47)defaultAudioLanguage- Audio language (BCP-47)allowedCountries/blockedCountries- Country restrictionshasPaidProductPlacement- Paid placement flagrecordingDate- Recording date (ISO 8601)
visibility- PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINERtarget_linkedin_page_id- Page ID for organization posts
facebook_page_id- Facebook Page ID (required)video_state- PUBLISHED, DRAFTfacebook_media_type- REELS, STORIESfacebook_link_url- URL for text posts
pinterest_board_id- Board IDpinterest_link- Destination linkpinterest_alt_text- Alt text for photospinterest_cover_image_url- Cover image URL (video)pinterest_cover_image_key_frame_time- Key frame time in ms
reply_settings- everyone, following, mentionedUsers, subscribers, verifiednullcast- Promoted-only posttagged_user_ids- User IDs to tagplace_id/geo_place_id- Location place IDquote_tweet_id- Tweet ID to quotepoll_options- Poll options (2-4)poll_duration- Poll duration in minutes (5-10080)for_super_followers_only- Exclusive for super followerscommunity_id- Community IDshare_with_followers- Share community post with followerscard_uri- Card URI for Twitter Cardsx_long_text_as_post- Post long text as single post
threads_long_text_as_post- Post long text as single post (vs thread)
subreddit- Subreddit name (without r/)flair_id- Flair template ID
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 |
async_upload |
Process asynchronously (default: True) |
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))MIT