captapi 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,3 +38,30 @@ next-env.d.ts.bak
38
38
  Thumbs.db
39
39
  *.log
40
40
  .commitmsg.tmp
41
+
42
+ # Generated marketing-agent artifacts
43
+ marketing/blog-drafts/
44
+ marketing/instagram-runs/
45
+
46
+ # Local probes / live audits (never publish)
47
+ backend/_probe*.py
48
+ backend/_audit*/
49
+ backend/_live_*
50
+ backend/_tmp*
51
+ backend/_trend*
52
+ backend/scripts/_probe*.py
53
+ backend/scripts/_spike*.py
54
+ **/comprehensive-live-audit*
55
+ **/*-live-audit-report.json
56
+ **/*-live-audit-live.jsonl
57
+ scripts/.env
58
+ scripts/_ad_library_ads_groups.py
59
+
60
+ # TikTok mobile-signing device pool (secret device identities)
61
+ backend/secrets/
62
+ **/tiktok_devices*.json
63
+
64
+ # Cursor API-surface sync marker
65
+ .cursor/.api-surface-dirty
66
+ .vercel
67
+ .env*
captapi-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: captapi
3
+ Version: 0.2.0
4
+ Summary: Official typed Python SDK for the Captapi social media API - 178 endpoints across 32 platforms (YouTube, TikTok, Instagram, Facebook, X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Twitch, Spotify, and more).
5
+ Project-URL: Homepage, https://captapi.com
6
+ Project-URL: Documentation, https://captapi.com/docs
7
+ Project-URL: Repository, https://github.com/CDCStream/captapi
8
+ Author-email: Captapi <support@captapi.com>
9
+ License: MIT
10
+ Keywords: api-client,captapi,instagram,reddit,scraping,sdk,social-media,tiktok,transcript,twitter,youtube
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.9
22
+ Requires-Dist: httpx>=0.24
23
+ Description-Content-Type: text/markdown
24
+
25
+ # captapi
26
+
27
+ Official typed Python SDK for the [Captapi](https://captapi.com) social media API — 178 endpoints across 32 platforms (YouTube, TikTok, Instagram, Facebook, X/Twitter, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Twitch, Spotify, SoundCloud, GitHub, and more).
28
+
29
+ - Sync **and** async clients (`Captapi` / `AsyncCaptapi`), built on `httpx`
30
+ - Typed, documented method for every endpoint — great autocomplete for humans and AI coding agents
31
+ - Errors always raise `CaptapiError` with status code and detail — no silent failures
32
+ - One bounded retry on 502/503 (skipped when the API says the failure is persistent or already cached)
33
+
34
+ ## Install
35
+
36
+ ```bash
37
+ pip install captapi
38
+ ```
39
+
40
+ ## Quick start
41
+
42
+ ```python
43
+ from captapi import Captapi
44
+
45
+ client = Captapi(api_key="YOUR_KEY") # or set CAPTAPI_API_KEY
46
+
47
+ transcript = client.youtube.transcript(url="https://youtube.com/watch?v=dQw4w9WgXcQ")
48
+ print(transcript["data"])
49
+
50
+ profile = client.tiktok.channel_details(url="https://tiktok.com/@nba")
51
+ posts = client.reddit.subreddit_posts(url="https://reddit.com/r/programming", limit=25)
52
+ ads = client.google_ad_library.company_ads(advertiser="nike.com")
53
+ ```
54
+
55
+ ## Async
56
+
57
+ ```python
58
+ from captapi import AsyncCaptapi
59
+
60
+ async with AsyncCaptapi() as client:
61
+ result = await client.instagram.channel_details(url="https://instagram.com/nba")
62
+ ```
63
+
64
+ ## Error handling
65
+
66
+ Every failed request raises — nothing fails silently:
67
+
68
+ ```python
69
+ from captapi import Captapi, CaptapiError
70
+
71
+ try:
72
+ client.instagram.channel_details(url="https://instagram.com/whoever")
73
+ except CaptapiError as err:
74
+ print(err.status_code, err.code, err.detail)
75
+ ```
76
+
77
+ ## Responses
78
+
79
+ All methods return the standard Captapi envelope as a `dict`:
80
+
81
+ ```json
82
+ { "success": true, "data": { ... } }
83
+ ```
84
+
85
+ ## Links
86
+
87
+ - [Documentation](https://captapi.com/docs)
88
+ - [Get an API key (100 free credits)](https://captapi.com/dashboard/api-keys)
89
+ - TypeScript SDK: [`npm install @captapi/sdk`](https://www.npmjs.com/package/@captapi/sdk)
90
+ - MCP server for AI agents: [`@captapi/mcp`](https://www.npmjs.com/package/@captapi/mcp)
91
+ - CLI: [`@captapi/cli`](https://www.npmjs.com/package/@captapi/cli)
@@ -0,0 +1,67 @@
1
+ # captapi
2
+
3
+ Official typed Python SDK for the [Captapi](https://captapi.com) social media API — 178 endpoints across 32 platforms (YouTube, TikTok, Instagram, Facebook, X/Twitter, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Twitch, Spotify, SoundCloud, GitHub, and more).
4
+
5
+ - Sync **and** async clients (`Captapi` / `AsyncCaptapi`), built on `httpx`
6
+ - Typed, documented method for every endpoint — great autocomplete for humans and AI coding agents
7
+ - Errors always raise `CaptapiError` with status code and detail — no silent failures
8
+ - One bounded retry on 502/503 (skipped when the API says the failure is persistent or already cached)
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install captapi
14
+ ```
15
+
16
+ ## Quick start
17
+
18
+ ```python
19
+ from captapi import Captapi
20
+
21
+ client = Captapi(api_key="YOUR_KEY") # or set CAPTAPI_API_KEY
22
+
23
+ transcript = client.youtube.transcript(url="https://youtube.com/watch?v=dQw4w9WgXcQ")
24
+ print(transcript["data"])
25
+
26
+ profile = client.tiktok.channel_details(url="https://tiktok.com/@nba")
27
+ posts = client.reddit.subreddit_posts(url="https://reddit.com/r/programming", limit=25)
28
+ ads = client.google_ad_library.company_ads(advertiser="nike.com")
29
+ ```
30
+
31
+ ## Async
32
+
33
+ ```python
34
+ from captapi import AsyncCaptapi
35
+
36
+ async with AsyncCaptapi() as client:
37
+ result = await client.instagram.channel_details(url="https://instagram.com/nba")
38
+ ```
39
+
40
+ ## Error handling
41
+
42
+ Every failed request raises — nothing fails silently:
43
+
44
+ ```python
45
+ from captapi import Captapi, CaptapiError
46
+
47
+ try:
48
+ client.instagram.channel_details(url="https://instagram.com/whoever")
49
+ except CaptapiError as err:
50
+ print(err.status_code, err.code, err.detail)
51
+ ```
52
+
53
+ ## Responses
54
+
55
+ All methods return the standard Captapi envelope as a `dict`:
56
+
57
+ ```json
58
+ { "success": true, "data": { ... } }
59
+ ```
60
+
61
+ ## Links
62
+
63
+ - [Documentation](https://captapi.com/docs)
64
+ - [Get an API key (100 free credits)](https://captapi.com/dashboard/api-keys)
65
+ - TypeScript SDK: [`npm install @captapi/sdk`](https://www.npmjs.com/package/@captapi/sdk)
66
+ - MCP server for AI agents: [`@captapi/mcp`](https://www.npmjs.com/package/@captapi/mcp)
67
+ - CLI: [`@captapi/cli`](https://www.npmjs.com/package/@captapi/cli)
@@ -17,5 +17,5 @@ Async:
17
17
  from ._generated import AsyncCaptapi, Captapi
18
18
  from ._transport import DEFAULT_BASE_URL, CaptapiError
19
19
 
20
- __version__ = "0.1.0"
20
+ __version__ = "0.2.0"
21
21
  __all__ = ["Captapi", "AsyncCaptapi", "CaptapiError", "DEFAULT_BASE_URL", "__version__"]