Skip to main content

Omniscrape Python SDK

The official Python SDK for the Omniscrape social media data API.

Supports Threads, Facebook, X (Twitter), Instagram, Reddit, LinkedIn, TikTok, YouTube, Dcard, Google Maps, and 104.

Installation

pip install omniscrape

Quick Start

from omniscrape import Omniscrape

client = Omniscrape(api_key="sk_oms_...")

# Get a Threads post
post = client.threads.get_post("DQt-ox3kdE4")
print(post.data.text)
print(post.data.stats.likes)

Platform Examples

Threads

# User profile
user = client.threads.get_user("zuck")
print(f"{user.data.username} — {user.data.follower_count} followers")

# Search posts
results = client.threads.search_posts("AI")

X (Twitter)

user = client.x.get_user("elonmusk")
tweet = client.x.get_post("1234567890")

# Auto-paginate all posts
for post in client.x.iter_user_posts("elonmusk"):
    print(post.text)

Instagram

user = client.instagram.get_user("instagram")
print(user.data.follower_count)

TikTok

video = client.tiktok.get_video("7123456789")
user = client.tiktok.get_user("khaby.lame")

# Browse trending
trending = client.tiktok.get_categories()

Reddit

sub = client.reddit.get_subreddit("python")
posts = client.reddit.get_subreddit_posts("python", sort="hot")

LinkedIn

company = client.linkedin.get_company("google")
jobs = client.linkedin.search_jobs(query="software engineer", location="Taiwan")

# Auto-paginate jobs
for job in client.linkedin.iter_search_jobs(query="data scientist"):
    print(job.title, job.location)

YouTube

video = client.youtube.get_video("dQw4w9WgXcQ")
channel = client.youtube.get_channel("@mkbhd")
results = client.youtube.search("machine learning", count=5)
transcript = client.youtube.get_video_transcription("dQw4w9WgXcQ", language="en")

Dcard

forum = client.dcard.get_forum("trending")
posts = client.dcard.get_forum_posts("trending", limit=10, popular=True)
results = client.dcard.search_posts("台大", limit=10)

Google Maps

results = client.gmaps.search("coffee shops in Tokyo", language="en")
place = client.gmaps.get_place("Blue Bottle Coffee Tokyo")

Facebook

page = client.facebook.get_user("NASA")
posts = client.facebook.get_user_posts("NASA")

104 Jobs

jobs = client.job104.search_jobs(q="Python工程師")
company = client.job104.get_company("company_id")

Async Support

import asyncio
from omniscrape import AsyncOmniscrape

async def main():
    async with AsyncOmniscrape(api_key="sk_oms_...") as client:
        post = await client.threads.get_post("DQt-ox3kdE4")
        print(post.data.text)

asyncio.run(main())

Rate Limit & Credit Info

Every response includes rate limit and credit usage:

resp = client.threads.get_post("DQt-ox3kdE4")
print(resp.rate_limit.remaining)  # requests left
print(resp.credit.remaining)      # credits left

Error Handling

from omniscrape import Omniscrape, NotFoundError, RateLimitError

try:
    client.threads.get_post("invalid")
except NotFoundError:
    print("Post not found")
except RateLimitError as e:
    print(f"Rate limited, retry after {e.retry_after}s")

Environment Variable

You can set your API key as an environment variable instead of passing it directly:

export OMNISCRAPE_API_KEY="sk_oms_..."
client = Omniscrape()  # picks up from env

Links

Metadata

Release files for omniscrape 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omniscrape 0.4.0
File Size Uploaded Provenance Actions
omniscrape-0.4.0.tar.gz 63.3 kB Without provenance Details for omniscrape-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omniscrape 0.4.0
File Interpreter ABI Platform Actions
omniscrape-0.4.0-py3-none-any.whl Python 3 none any Details for omniscrape-0.4.0-py3-none-any.whl

Total release size: 92.8 kB

Release files / omniscrape-0.4.0.tar.gz

Download URL omniscrape-0.4.0.tar.gz
Size 63.3 kB
Tags Source
SHA-256 checksum
How to use checksums
18865ed6018d6832dd53a49d64014f0dafaa2ad534abeeb94d6eda0bae6dff1b
BLAKE2b-256 checksum
How to use checksums
5477f2a74c2dff8a91c8e15925a0c2a684ed4b3119dc46f16805b8d1a1ad7881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.4

Release files / omniscrape-0.4.0-py3-none-any.whl

Download URL omniscrape-0.4.0-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfb3a43bce0b139dccbab803294f3028409371fe006f6af040b4f52990251f11
BLAKE2b-256 checksum
How to use checksums
836bd208b572b79fefa0f3b0212cc96387ca32ff196ee9d33943a1b93894e20e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.4

Security for omniscrape 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page