captapi 0.2.0__tar.gz → 0.3.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.
@@ -52,6 +52,7 @@ backend/_trend*
52
52
  backend/scripts/_probe*.py
53
53
  backend/scripts/_spike*.py
54
54
  **/comprehensive-live-audit*
55
+ **/playground-defaults-*.json
55
56
  **/*-live-audit-report.json
56
57
  **/*-live-audit-live.jsonl
57
58
  scripts/.env
@@ -63,5 +64,12 @@ backend/secrets/
63
64
 
64
65
  # Cursor API-surface sync marker
65
66
  .cursor/.api-surface-dirty
66
- .vercel
67
- .env*
67
+
68
+ # Credit-restore audits: customer URLs and response bodies, never committed
69
+ **/restore-candidates*
70
+ **/restore-list*
71
+ **/*-restore-verdicts*
72
+ **/*response-samples*.json
73
+ **/*response-samples*.md
74
+ **/*response_samples*.json
75
+ **/*response_samples*.jsonl
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: captapi
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
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
5
  Project-URL: Homepage, https://captapi.com
6
6
  Project-URL: Documentation, https://captapi.com/docs
@@ -1,67 +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)
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)
@@ -1,21 +1,21 @@
1
- """Official Python SDK for the Captapi social media API.
2
-
3
- Usage:
4
- from captapi import Captapi
5
-
6
- client = Captapi(api_key="YOUR_KEY") # or set CAPTAPI_API_KEY
7
- result = client.youtube.transcript(url="https://youtube.com/watch?v=...")
8
- print(result["data"])
9
-
10
- Async:
11
- from captapi import AsyncCaptapi
12
-
13
- async with AsyncCaptapi() as client:
14
- result = await client.tiktok.profile(url="https://tiktok.com/@user")
15
- """
16
-
17
- from ._generated import AsyncCaptapi, Captapi
18
- from ._transport import DEFAULT_BASE_URL, CaptapiError
19
-
20
- __version__ = "0.2.0"
21
- __all__ = ["Captapi", "AsyncCaptapi", "CaptapiError", "DEFAULT_BASE_URL", "__version__"]
1
+ """Official Python SDK for the Captapi social media API.
2
+
3
+ Usage:
4
+ from captapi import Captapi
5
+
6
+ client = Captapi(api_key="YOUR_KEY") # or set CAPTAPI_API_KEY
7
+ result = client.youtube.transcript(url="https://youtube.com/watch?v=...")
8
+ print(result["data"])
9
+
10
+ Async:
11
+ from captapi import AsyncCaptapi
12
+
13
+ async with AsyncCaptapi() as client:
14
+ result = await client.tiktok.profile(url="https://tiktok.com/@user")
15
+ """
16
+
17
+ from ._generated import AsyncCaptapi, Captapi
18
+ from ._transport import DEFAULT_BASE_URL, CaptapiError
19
+
20
+ __version__ = "0.3.0"
21
+ __all__ = ["Captapi", "AsyncCaptapi", "CaptapiError", "DEFAULT_BASE_URL", "__version__"]