universal-mcp-applications 0.1.20__py3-none-any.whl → 0.1.22__py3-none-any.whl
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.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/BEST_PRACTICES.md +166 -0
- universal_mcp/applications/airtable/app.py +0 -1
- universal_mcp/applications/apollo/app.py +0 -1
- universal_mcp/applications/aws_s3/app.py +40 -39
- universal_mcp/applications/browser_use/README.md +1 -0
- universal_mcp/applications/browser_use/__init__.py +0 -0
- universal_mcp/applications/browser_use/app.py +76 -0
- universal_mcp/applications/calendly/app.py +125 -125
- universal_mcp/applications/canva/app.py +95 -99
- universal_mcp/applications/confluence/app.py +0 -1
- universal_mcp/applications/contentful/app.py +4 -5
- universal_mcp/applications/domain_checker/app.py +11 -15
- universal_mcp/applications/e2b/app.py +4 -4
- universal_mcp/applications/elevenlabs/app.py +18 -15
- universal_mcp/applications/exa/app.py +17 -17
- universal_mcp/applications/falai/app.py +28 -29
- universal_mcp/applications/file_system/app.py +9 -9
- universal_mcp/applications/firecrawl/app.py +36 -36
- universal_mcp/applications/fireflies/app.py +55 -56
- universal_mcp/applications/fpl/app.py +49 -50
- universal_mcp/applications/ghost_content/app.py +0 -1
- universal_mcp/applications/github/app.py +41 -43
- universal_mcp/applications/google_calendar/app.py +40 -39
- universal_mcp/applications/google_docs/app.py +56 -56
- universal_mcp/applications/google_drive/app.py +212 -215
- universal_mcp/applications/google_gemini/app.py +1 -5
- universal_mcp/applications/google_mail/app.py +91 -90
- universal_mcp/applications/google_searchconsole/app.py +29 -29
- universal_mcp/applications/google_sheet/app.py +115 -115
- universal_mcp/applications/hashnode/README.md +6 -3
- universal_mcp/applications/hashnode/app.py +174 -25
- universal_mcp/applications/http_tools/app.py +10 -11
- universal_mcp/applications/hubspot/__init__.py +1 -1
- universal_mcp/applications/hubspot/api_segments/api_segment_base.py +36 -7
- universal_mcp/applications/hubspot/api_segments/crm_api.py +368 -368
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +115 -115
- universal_mcp/applications/hubspot/app.py +131 -72
- universal_mcp/applications/jira/app.py +0 -1
- universal_mcp/applications/linkedin/app.py +20 -20
- universal_mcp/applications/markitdown/app.py +10 -5
- universal_mcp/applications/ms_teams/app.py +123 -123
- universal_mcp/applications/openai/app.py +40 -39
- universal_mcp/applications/outlook/app.py +32 -32
- universal_mcp/applications/perplexity/app.py +4 -4
- universal_mcp/applications/reddit/app.py +69 -70
- universal_mcp/applications/resend/app.py +116 -117
- universal_mcp/applications/rocketlane/app.py +0 -1
- universal_mcp/applications/scraper/__init__.py +1 -1
- universal_mcp/applications/scraper/app.py +234 -16
- universal_mcp/applications/serpapi/app.py +14 -14
- universal_mcp/applications/sharepoint/app.py +19 -20
- universal_mcp/applications/shopify/app.py +0 -1
- universal_mcp/applications/slack/app.py +48 -48
- universal_mcp/applications/tavily/app.py +4 -4
- universal_mcp/applications/twitter/api_segments/compliance_api.py +13 -15
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +20 -20
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/likes_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/lists_api.py +37 -39
- universal_mcp/applications/twitter/api_segments/spaces_api.py +24 -24
- universal_mcp/applications/twitter/api_segments/trends_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/tweets_api.py +105 -105
- universal_mcp/applications/twitter/api_segments/usage_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/users_api.py +136 -136
- universal_mcp/applications/twitter/app.py +6 -2
- universal_mcp/applications/unipile/app.py +321 -71
- universal_mcp/applications/whatsapp/app.py +53 -54
- universal_mcp/applications/whatsapp/audio.py +39 -35
- universal_mcp/applications/whatsapp/whatsapp.py +176 -154
- universal_mcp/applications/whatsapp_business/app.py +92 -92
- universal_mcp/applications/yahoo_finance/app.py +105 -63
- universal_mcp/applications/youtube/app.py +206 -199
- universal_mcp/applications/zenquotes/__init__.py +2 -0
- universal_mcp/applications/zenquotes/app.py +3 -3
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/METADATA +2 -1
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/RECORD +78 -74
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,7 +3,6 @@ from collections.abc import Callable
|
|
|
3
3
|
from typing import Any, Literal
|
|
4
4
|
|
|
5
5
|
from loguru import logger
|
|
6
|
-
|
|
7
6
|
from universal_mcp.applications.application import APIApplication
|
|
8
7
|
from universal_mcp.integrations import Integration
|
|
9
8
|
|
|
@@ -51,7 +50,7 @@ class UnipileApp(APIApplication):
|
|
|
51
50
|
def base_url(self, base_url: str) -> None:
|
|
52
51
|
"""
|
|
53
52
|
Sets or overrides the Unipile API's base URL. This setter allows manually changing the endpoint, bypassing the default URL that is dynamically constructed from integration credentials. It is primarily intended for testing against different environments or for custom deployments.
|
|
54
|
-
|
|
53
|
+
|
|
55
54
|
Args:
|
|
56
55
|
base_url: The new base URL to set.
|
|
57
56
|
"""
|
|
@@ -105,7 +104,7 @@ class UnipileApp(APIApplication):
|
|
|
105
104
|
) -> dict[str, Any]:
|
|
106
105
|
"""
|
|
107
106
|
Retrieves a paginated list of all chat conversations across linked accounts. Supports filtering by unread status, date range, account provider, and specific account IDs, distinguishing it from functions listing messages within a single chat.
|
|
108
|
-
|
|
107
|
+
|
|
109
108
|
Args:
|
|
110
109
|
unread: Filter for unread chats only or read chats only.
|
|
111
110
|
cursor: Pagination cursor for the next page of entries.
|
|
@@ -114,13 +113,13 @@ class UnipileApp(APIApplication):
|
|
|
114
113
|
limit: Number of items to return (1-250).
|
|
115
114
|
account_type: Filter by provider (e.g., "linkedin").
|
|
116
115
|
account_id: Filter by specific account IDs (comma-separated).
|
|
117
|
-
|
|
116
|
+
|
|
118
117
|
Returns:
|
|
119
118
|
A dictionary containing a list of chat objects and a pagination cursor.
|
|
120
|
-
|
|
119
|
+
|
|
121
120
|
Raises:
|
|
122
121
|
httpx.HTTPError: If the API request fails.
|
|
123
|
-
|
|
122
|
+
|
|
124
123
|
Tags:
|
|
125
124
|
linkedin, chat, list, messaging, api
|
|
126
125
|
"""
|
|
@@ -155,7 +154,7 @@ class UnipileApp(APIApplication):
|
|
|
155
154
|
) -> dict[str, Any]:
|
|
156
155
|
"""
|
|
157
156
|
Retrieves messages from a specific chat identified by `chat_id`. Supports pagination and filtering by date or sender. Unlike `list_all_messages`, which fetches from all chats, this function targets the contents of a single conversation.
|
|
158
|
-
|
|
157
|
+
|
|
159
158
|
Args:
|
|
160
159
|
chat_id: The ID of the chat to retrieve messages from.
|
|
161
160
|
cursor: Pagination cursor for the next page of entries.
|
|
@@ -163,13 +162,13 @@ class UnipileApp(APIApplication):
|
|
|
163
162
|
after: Filter for items created after this ISO 8601 UTC datetime (exclusive).
|
|
164
163
|
limit: Number of items to return (1-250).
|
|
165
164
|
sender_id: Filter messages from a specific sender ID.
|
|
166
|
-
|
|
165
|
+
|
|
167
166
|
Returns:
|
|
168
167
|
A dictionary containing a list of message objects and a pagination cursor.
|
|
169
|
-
|
|
168
|
+
|
|
170
169
|
Raises:
|
|
171
170
|
httpx.HTTPError: If the API request fails.
|
|
172
|
-
|
|
171
|
+
|
|
173
172
|
Tags:
|
|
174
173
|
linkedin, chat, message, list, messaging, api
|
|
175
174
|
"""
|
|
@@ -196,18 +195,18 @@ class UnipileApp(APIApplication):
|
|
|
196
195
|
) -> dict[str, Any]:
|
|
197
196
|
"""
|
|
198
197
|
Sends a text message to a specific chat conversation using its `chat_id`. This function creates a new message via a POST request, distinguishing it from read-only functions like `list_chat_messages`. It returns the API's response, which typically confirms the successful creation of the message.
|
|
199
|
-
|
|
198
|
+
|
|
200
199
|
Args:
|
|
201
200
|
chat_id: The ID of the chat where the message will be sent.
|
|
202
201
|
text: The text content of the message.
|
|
203
202
|
attachments: Optional list of attachment objects to include with the message.
|
|
204
|
-
|
|
203
|
+
|
|
205
204
|
Returns:
|
|
206
205
|
A dictionary containing the ID of the sent message.
|
|
207
|
-
|
|
206
|
+
|
|
208
207
|
Raises:
|
|
209
208
|
httpx.HTTPError: If the API request fails.
|
|
210
|
-
|
|
209
|
+
|
|
211
210
|
Tags:
|
|
212
211
|
linkedin, chat, message, send, create, messaging, api
|
|
213
212
|
"""
|
|
@@ -222,17 +221,17 @@ class UnipileApp(APIApplication):
|
|
|
222
221
|
) -> dict[str, Any]:
|
|
223
222
|
"""
|
|
224
223
|
Retrieves a single chat's details using its Unipile or provider-specific ID. Requires an `account_id` when using a provider ID for context. This function is distinct from `list_all_chats`, which returns a collection, by targeting one specific conversation.
|
|
225
|
-
|
|
224
|
+
|
|
226
225
|
Args:
|
|
227
226
|
chat_id: The Unipile or provider ID of the chat.
|
|
228
227
|
account_id: Mandatory if the chat_id is a provider ID. Specifies the account context.
|
|
229
|
-
|
|
228
|
+
|
|
230
229
|
Returns:
|
|
231
230
|
A dictionary containing the chat object details.
|
|
232
|
-
|
|
231
|
+
|
|
233
232
|
Raises:
|
|
234
233
|
httpx.HTTPError: If the API request fails.
|
|
235
|
-
|
|
234
|
+
|
|
236
235
|
Tags:
|
|
237
236
|
linkedin, chat, retrieve, get, messaging, api
|
|
238
237
|
"""
|
|
@@ -255,7 +254,7 @@ class UnipileApp(APIApplication):
|
|
|
255
254
|
) -> dict[str, Any]:
|
|
256
255
|
"""
|
|
257
256
|
Retrieves a paginated list of messages from all chats associated with the account(s). Unlike `list_chat_messages` which targets a specific conversation, this function provides a global message view, filterable by sender, account, and date range.
|
|
258
|
-
|
|
257
|
+
|
|
259
258
|
Args:
|
|
260
259
|
cursor: Pagination cursor.
|
|
261
260
|
before: Filter for items created before this ISO 8601 UTC datetime.
|
|
@@ -263,13 +262,13 @@ class UnipileApp(APIApplication):
|
|
|
263
262
|
limit: Number of items to return (1-250).
|
|
264
263
|
sender_id: Filter messages from a specific sender.
|
|
265
264
|
account_id: Filter messages from a specific linked account.
|
|
266
|
-
|
|
265
|
+
|
|
267
266
|
Returns:
|
|
268
267
|
A dictionary containing a list of message objects and a pagination cursor.
|
|
269
|
-
|
|
268
|
+
|
|
270
269
|
Raises:
|
|
271
270
|
httpx.HTTPError: If the API request fails.
|
|
272
|
-
|
|
271
|
+
|
|
273
272
|
Tags:
|
|
274
273
|
linkedin, message, list, all_messages, messaging, api
|
|
275
274
|
"""
|
|
@@ -298,17 +297,17 @@ class UnipileApp(APIApplication):
|
|
|
298
297
|
) -> dict[str, Any]:
|
|
299
298
|
"""
|
|
300
299
|
Retrieves a paginated list of all social media accounts linked to the Unipile service. This is crucial for obtaining the `account_id` required by other methods to specify which user account should perform an action, like sending a message or retrieving user-specific posts.
|
|
301
|
-
|
|
300
|
+
|
|
302
301
|
Args:
|
|
303
302
|
cursor: Pagination cursor.
|
|
304
303
|
limit: Number of items to return (1-259).
|
|
305
|
-
|
|
304
|
+
|
|
306
305
|
Returns:
|
|
307
306
|
A dictionary containing a list of account objects and a pagination cursor.
|
|
308
|
-
|
|
307
|
+
|
|
309
308
|
Raises:
|
|
310
309
|
httpx.HTTPError: If the API request fails.
|
|
311
|
-
|
|
310
|
+
|
|
312
311
|
Tags:
|
|
313
312
|
linkedin, account, list, unipile, api, important
|
|
314
313
|
"""
|
|
@@ -328,16 +327,16 @@ class UnipileApp(APIApplication):
|
|
|
328
327
|
) -> dict[str, Any]:
|
|
329
328
|
"""
|
|
330
329
|
Retrieves details for a specific account linked to Unipile using its ID. It fetches metadata about the connection itself (e.g., a linked LinkedIn account), differentiating it from `retrieve_user_profile` which fetches a user's profile from the external platform.
|
|
331
|
-
|
|
330
|
+
|
|
332
331
|
Args:
|
|
333
332
|
account_id: The ID of the account to retrieve.
|
|
334
|
-
|
|
333
|
+
|
|
335
334
|
Returns:
|
|
336
335
|
A dictionary containing the account object details.
|
|
337
|
-
|
|
336
|
+
|
|
338
337
|
Raises:
|
|
339
338
|
httpx.HTTPError: If the API request fails.
|
|
340
|
-
|
|
339
|
+
|
|
341
340
|
Tags:
|
|
342
341
|
linkedin, account, retrieve, get, unipile, api, important
|
|
343
342
|
"""
|
|
@@ -355,20 +354,20 @@ class UnipileApp(APIApplication):
|
|
|
355
354
|
) -> dict[str, Any]:
|
|
356
355
|
"""
|
|
357
356
|
Retrieves a paginated list of posts from a specific user or company profile using their provider ID. An authorizing `account_id` is required, and the `is_company` flag must specify the entity type, distinguishing this from `retrieve_post` which fetches a single post by its own ID.
|
|
358
|
-
|
|
357
|
+
|
|
359
358
|
Args:
|
|
360
359
|
identifier: The entity's provider internal ID (LinkedIn ID).
|
|
361
360
|
account_id: The ID of the Unipile account to perform the request from (REQUIRED).
|
|
362
361
|
cursor: Pagination cursor.
|
|
363
362
|
limit: Number of items to return (1-100, as per Unipile example, though spec allows up to 250).
|
|
364
363
|
is_company: Boolean indicating if the identifier is for a company.
|
|
365
|
-
|
|
364
|
+
|
|
366
365
|
Returns:
|
|
367
366
|
A dictionary containing a list of post objects and pagination details.
|
|
368
|
-
|
|
367
|
+
|
|
369
368
|
Raises:
|
|
370
369
|
httpx.HTTPError: If the API request fails.
|
|
371
|
-
|
|
370
|
+
|
|
372
371
|
Tags:
|
|
373
372
|
linkedin, post, list, user_posts, company_posts, content, api, important
|
|
374
373
|
"""
|
|
@@ -390,16 +389,16 @@ class UnipileApp(APIApplication):
|
|
|
390
389
|
) -> dict[str, Any]:
|
|
391
390
|
"""
|
|
392
391
|
Retrieves the profile details for the user associated with the specified Unipile account ID. This function targets the API's 'me' endpoint to fetch the authenticated user's profile, distinct from `retrieve_user_profile` which fetches profiles of other users by their public identifier.
|
|
393
|
-
|
|
392
|
+
|
|
394
393
|
Args:
|
|
395
394
|
account_id: The ID of the Unipile account to use for retrieving the profile (REQUIRED).
|
|
396
|
-
|
|
395
|
+
|
|
397
396
|
Returns:
|
|
398
397
|
A dictionary containing the user's profile details.
|
|
399
|
-
|
|
398
|
+
|
|
400
399
|
Raises:
|
|
401
400
|
httpx.HTTPError: If the API request fails.
|
|
402
|
-
|
|
401
|
+
|
|
403
402
|
Tags:
|
|
404
403
|
linkedin, user, profile, me, retrieve, get, api
|
|
405
404
|
"""
|
|
@@ -415,17 +414,17 @@ class UnipileApp(APIApplication):
|
|
|
415
414
|
) -> dict[str, Any]:
|
|
416
415
|
"""
|
|
417
416
|
Fetches a specific post's details by its unique ID, requiring an `account_id` for authorization. Unlike `list_profile_posts`, which retrieves a collection of posts from a user or company profile, this function targets one specific post and returns its full object.
|
|
418
|
-
|
|
417
|
+
|
|
419
418
|
Args:
|
|
420
419
|
post_id: The ID of the post to retrieve.
|
|
421
420
|
account_id: The ID of the Unipile account to perform the request from (REQUIRED).
|
|
422
|
-
|
|
421
|
+
|
|
423
422
|
Returns:
|
|
424
423
|
A dictionary containing the post details.
|
|
425
|
-
|
|
424
|
+
|
|
426
425
|
Raises:
|
|
427
426
|
httpx.HTTPError: If the API request fails.
|
|
428
|
-
|
|
427
|
+
|
|
429
428
|
Tags:
|
|
430
429
|
linkedin, post, retrieve, get, content, api, important
|
|
431
430
|
"""
|
|
@@ -444,20 +443,20 @@ class UnipileApp(APIApplication):
|
|
|
444
443
|
) -> dict[str, Any]:
|
|
445
444
|
"""
|
|
446
445
|
Fetches comments for a specific post using an `account_id` for authorization. Providing an optional `comment_id` retrieves threaded replies instead of top-level comments. This read-only operation contrasts with `create_post_comment`, which publishes new comments, and `list_content_reactions`, which retrieves 'likes'.
|
|
447
|
-
|
|
446
|
+
|
|
448
447
|
Args:
|
|
449
448
|
post_id: The social ID of the post.
|
|
450
449
|
account_id: The ID of the Unipile account to perform the request from (REQUIRED).
|
|
451
450
|
comment_id: If provided, retrieves replies to this comment ID instead of top-level comments.
|
|
452
451
|
cursor: Pagination cursor.
|
|
453
452
|
limit: Number of comments to return. (OpenAPI spec shows type string, passed as string if provided).
|
|
454
|
-
|
|
453
|
+
|
|
455
454
|
Returns:
|
|
456
455
|
A dictionary containing a list of comment objects and pagination details.
|
|
457
|
-
|
|
456
|
+
|
|
458
457
|
Raises:
|
|
459
458
|
httpx.HTTPError: If the API request fails.
|
|
460
|
-
|
|
459
|
+
|
|
461
460
|
Tags:
|
|
462
461
|
linkedin, post, comment, list, content, api, important
|
|
463
462
|
"""
|
|
@@ -482,20 +481,20 @@ class UnipileApp(APIApplication):
|
|
|
482
481
|
) -> dict[str, Any]:
|
|
483
482
|
"""
|
|
484
483
|
Publishes a new top-level post from a specified account, including text, user mentions, and an external link. This function creates original content, distinguishing it from `create_post_comment` which adds replies to existing posts.
|
|
485
|
-
|
|
484
|
+
|
|
486
485
|
Args:
|
|
487
486
|
account_id: The ID of the Unipile account that will author the post (added as query parameter).
|
|
488
487
|
text: The main text content of the post.
|
|
489
488
|
mentions: Optional list of dictionaries, each representing a mention.
|
|
490
489
|
Example: `[{"entity_urn": "urn:li:person:...", "start_index": 0, "end_index": 5}]`
|
|
491
490
|
external_link: Optional string, an external URL that should be displayed within a card.
|
|
492
|
-
|
|
491
|
+
|
|
493
492
|
Returns:
|
|
494
493
|
A dictionary containing the ID of the created post.
|
|
495
|
-
|
|
494
|
+
|
|
496
495
|
Raises:
|
|
497
496
|
httpx.HTTPError: If the API request fails.
|
|
498
|
-
|
|
497
|
+
|
|
499
498
|
Tags:
|
|
500
499
|
linkedin, post, create, share, content, api, important
|
|
501
500
|
"""
|
|
@@ -524,20 +523,20 @@ class UnipileApp(APIApplication):
|
|
|
524
523
|
) -> dict[str, Any]:
|
|
525
524
|
"""
|
|
526
525
|
Retrieves a paginated list of reactions for a given post or, optionally, a specific comment. This read-only operation uses the provided `account_id` for the request, distinguishing it from the `create_reaction` function which adds new reactions.
|
|
527
|
-
|
|
526
|
+
|
|
528
527
|
Args:
|
|
529
528
|
post_id: The social ID of the post.
|
|
530
529
|
account_id: The ID of the Unipile account to perform the request from .
|
|
531
530
|
comment_id: If provided, retrieves reactions for this comment ID.
|
|
532
531
|
cursor: Pagination cursor.
|
|
533
532
|
limit: Number of reactions to return (1-100, spec max 250).
|
|
534
|
-
|
|
533
|
+
|
|
535
534
|
Returns:
|
|
536
535
|
A dictionary containing a list of reaction objects and pagination details.
|
|
537
|
-
|
|
536
|
+
|
|
538
537
|
Raises:
|
|
539
538
|
httpx.HTTPError: If the API request fails.
|
|
540
|
-
|
|
539
|
+
|
|
541
540
|
Tags:
|
|
542
541
|
linkedin, post, reaction, list, like, content, api
|
|
543
542
|
"""
|
|
@@ -563,7 +562,7 @@ class UnipileApp(APIApplication):
|
|
|
563
562
|
) -> dict[str, Any]:
|
|
564
563
|
"""
|
|
565
564
|
Publishes a comment on a specified post. By providing an optional `comment_id`, it creates a threaded reply to an existing comment instead of a new top-level one. This function's dual capability distinguishes it from `list_post_comments`, which only retrieves comments and their replies.
|
|
566
|
-
|
|
565
|
+
|
|
567
566
|
Args:
|
|
568
567
|
post_social_id: The social ID of the post to comment on.
|
|
569
568
|
account_id: The ID of the Unipile account performing the comment.
|
|
@@ -571,13 +570,13 @@ class UnipileApp(APIApplication):
|
|
|
571
570
|
Supports Unipile's mention syntax like "Hey {{0}}".
|
|
572
571
|
comment_id: Optional ID of a specific comment to reply to instead of commenting on the post.
|
|
573
572
|
mentions_body: Optional list of mention objects for the request body if needed.
|
|
574
|
-
|
|
573
|
+
|
|
575
574
|
Returns:
|
|
576
575
|
A dictionary, likely confirming comment creation. (Structure depends on actual API response)
|
|
577
|
-
|
|
576
|
+
|
|
578
577
|
Raises:
|
|
579
578
|
httpx.HTTPError: If the API request fails.
|
|
580
|
-
|
|
579
|
+
|
|
581
580
|
Tags:
|
|
582
581
|
linkedin, post, comment, create, content, api, important
|
|
583
582
|
"""
|
|
@@ -614,19 +613,19 @@ class UnipileApp(APIApplication):
|
|
|
614
613
|
) -> dict[str, Any]:
|
|
615
614
|
"""
|
|
616
615
|
Adds a specified reaction (e.g., 'like', 'love') to a LinkedIn post or, optionally, to a specific comment. This function performs a POST request to create the reaction, differentiating it from `list_content_reactions` which only retrieves existing ones.
|
|
617
|
-
|
|
616
|
+
|
|
618
617
|
Args:
|
|
619
618
|
post_social_id: The social ID of the post or comment to react to.
|
|
620
619
|
reaction_type: The type of reaction .
|
|
621
620
|
account_id: Account ID of the Unipile account performing the reaction.
|
|
622
621
|
comment_id: Optional ID of a specific comment to react to instead of the post.
|
|
623
|
-
|
|
622
|
+
|
|
624
623
|
Returns:
|
|
625
624
|
A dictionary, likely confirming the reaction. (Structure depends on actual API response)
|
|
626
|
-
|
|
625
|
+
|
|
627
626
|
Raises:
|
|
628
627
|
httpx.HTTPError: If the API request fails.
|
|
629
|
-
|
|
628
|
+
|
|
630
629
|
Tags:
|
|
631
630
|
linkedin, post, reaction, create, like, content, api, important
|
|
632
631
|
"""
|
|
@@ -684,7 +683,7 @@ class UnipileApp(APIApplication):
|
|
|
684
683
|
) -> dict[str, Any]:
|
|
685
684
|
"""
|
|
686
685
|
Performs a comprehensive LinkedIn search for people, companies, posts, or jobs using granular filters like keywords and location. Alternatively, it can execute a search from a direct LinkedIn URL. Supports pagination and targets either the classic or Sales Navigator API.
|
|
687
|
-
|
|
686
|
+
|
|
688
687
|
Args:
|
|
689
688
|
account_id: The ID of the Unipile account to perform the search from (REQUIRED).
|
|
690
689
|
category: Type of search to perform - "people", "companies", "posts", or "jobs".
|
|
@@ -709,13 +708,13 @@ class UnipileApp(APIApplication):
|
|
|
709
708
|
"value": 80
|
|
710
709
|
}
|
|
711
710
|
search_url: Direct LinkedIn search URL to use instead of building parameters.
|
|
712
|
-
|
|
711
|
+
|
|
713
712
|
Returns:
|
|
714
713
|
A dictionary containing search results and pagination details.
|
|
715
|
-
|
|
714
|
+
|
|
716
715
|
Raises:
|
|
717
716
|
httpx.HTTPError: If the API request fails.
|
|
718
|
-
|
|
717
|
+
|
|
719
718
|
Tags:
|
|
720
719
|
linkedin, search, people, companies, posts, jobs, api, important
|
|
721
720
|
"""
|
|
@@ -778,6 +777,255 @@ class UnipileApp(APIApplication):
|
|
|
778
777
|
response = self._post(url, params=params, data=payload)
|
|
779
778
|
return self._handle_response(response)
|
|
780
779
|
|
|
780
|
+
def people_search(
|
|
781
|
+
self,
|
|
782
|
+
account_id: str,
|
|
783
|
+
cursor: str | None = None,
|
|
784
|
+
limit: int | None = None,
|
|
785
|
+
keywords: str | None = None,
|
|
786
|
+
last_viewed_at: int | None = None,
|
|
787
|
+
saved_search_id: str | None = None,
|
|
788
|
+
recent_search_id: str | None = None,
|
|
789
|
+
location: dict[str, Any] | None = None,
|
|
790
|
+
location_by_postal_code: dict[str, Any] | None = None,
|
|
791
|
+
industry: dict[str, Any] | None = None,
|
|
792
|
+
first_name: str | None = None,
|
|
793
|
+
last_name: str | None = None,
|
|
794
|
+
tenure: list[dict[str, Any]] | None = None,
|
|
795
|
+
groups: list[str] | None = None,
|
|
796
|
+
school: dict[str, Any] | None = None,
|
|
797
|
+
profile_language: list[str] | None = None,
|
|
798
|
+
company: dict[str, Any] | None = None,
|
|
799
|
+
company_headcount: list[dict[str, Any]] | None = None,
|
|
800
|
+
company_type: list[str] | None = None,
|
|
801
|
+
company_location: dict[str, Any] | None = None,
|
|
802
|
+
tenure_at_company: list[dict[str, Any]] | None = None,
|
|
803
|
+
past_company: dict[str, Any] | None = None,
|
|
804
|
+
function: dict[str, Any] | None = None,
|
|
805
|
+
role: dict[str, Any] | None = None,
|
|
806
|
+
tenure_at_role: list[dict[str, Any]] | None = None,
|
|
807
|
+
seniority: dict[str, Any] | None = None,
|
|
808
|
+
past_role: dict[str, Any] | None = None,
|
|
809
|
+
following_your_company: bool | None = None,
|
|
810
|
+
viewed_your_profile_recently: bool | None = None,
|
|
811
|
+
network_distance: list[str] | None = None,
|
|
812
|
+
connections_of: list[str] | None = None,
|
|
813
|
+
past_colleague: bool | None = None,
|
|
814
|
+
shared_experiences: bool | None = None,
|
|
815
|
+
changed_jobs: bool | None = None,
|
|
816
|
+
posted_on_linkedin: bool | None = None,
|
|
817
|
+
mentionned_in_news: bool | None = None,
|
|
818
|
+
persona: list[str] | None = None,
|
|
819
|
+
account_lists: dict[str, Any] | None = None,
|
|
820
|
+
lead_lists: dict[str, Any] | None = None,
|
|
821
|
+
viewed_profile_recently: bool | None = None,
|
|
822
|
+
messaged_recently: bool | None = None,
|
|
823
|
+
include_saved_leads: bool | None = None,
|
|
824
|
+
include_saved_accounts: bool | None = None,
|
|
825
|
+
) -> dict[str, Any]:
|
|
826
|
+
"""
|
|
827
|
+
Performs a comprehensive LinkedIn Sales Navigator people search with all available parameters.
|
|
828
|
+
This function provides access to LinkedIn's advanced Sales Navigator search capabilities
|
|
829
|
+
for finding people with precise targeting options.
|
|
830
|
+
|
|
831
|
+
Args:
|
|
832
|
+
account_id: The ID of the Unipile account to perform the search from (REQUIRED).
|
|
833
|
+
cursor: Pagination cursor for the next page of entries.
|
|
834
|
+
limit: Number of items to return.
|
|
835
|
+
keywords: LinkedIn native filter: KEYWORDS.
|
|
836
|
+
last_viewed_at: Unix timestamp for saved search filtering.
|
|
837
|
+
saved_search_id: ID of saved search (overrides other parameters).
|
|
838
|
+
recent_search_id: ID of recent search (overrides other parameters).
|
|
839
|
+
location: LinkedIn native filter: GEOGRAPHY.
|
|
840
|
+
location_by_postal_code: Location filter by postal code.
|
|
841
|
+
industry: LinkedIn native filter: INDUSTRY.
|
|
842
|
+
first_name: LinkedIn native filter: FIRST NAME.
|
|
843
|
+
last_name: LinkedIn native filter: LAST NAME.
|
|
844
|
+
tenure: LinkedIn native filter: YEARS OF EXPERIENCE.
|
|
845
|
+
groups: LinkedIn native filter: GROUPS.
|
|
846
|
+
school: LinkedIn native filter: SCHOOL.
|
|
847
|
+
profile_language: ISO 639-1 language codes, LinkedIn native filter: PROFILE LANGUAGE.
|
|
848
|
+
company: LinkedIn native filter: CURRENT COMPANY.
|
|
849
|
+
company_headcount: LinkedIn native filter: COMPANY HEADCOUNT.
|
|
850
|
+
company_type: LinkedIn native filter: COMPANY TYPE.
|
|
851
|
+
company_location: LinkedIn native filter: COMPANY HEADQUARTERS LOCATION.
|
|
852
|
+
tenure_at_company: LinkedIn native filter: YEARS IN CURRENT COMPANY.
|
|
853
|
+
past_company: LinkedIn native filter: PAST COMPANY.
|
|
854
|
+
function: LinkedIn native filter: FUNCTION.
|
|
855
|
+
role: LinkedIn native filter: CURRENT JOB TITLE.
|
|
856
|
+
tenure_at_role: LinkedIn native filter: YEARS IN CURRENT POSITION.
|
|
857
|
+
seniority: LinkedIn native filter: SENIORITY LEVEL.
|
|
858
|
+
past_role: LinkedIn native filter: PAST JOB TITLE.
|
|
859
|
+
following_your_company: LinkedIn native filter: FOLLOWING YOUR COMPANY.
|
|
860
|
+
viewed_your_profile_recently: LinkedIn native filter: VIEWED YOUR PROFILE RECENTLY.
|
|
861
|
+
network_distance: First, second, third+ degree or GROUP, LinkedIn native filter: CONNECTION.
|
|
862
|
+
connections_of: LinkedIn native filter: CONNECTIONS OF.
|
|
863
|
+
past_colleague: LinkedIn native filter: PAST COLLEAGUE.
|
|
864
|
+
shared_experiences: LinkedIn native filter: SHARED EXPERIENCES.
|
|
865
|
+
changed_jobs: LinkedIn native filter: CHANGED JOBS.
|
|
866
|
+
posted_on_linkedin: LinkedIn native filter: POSTED ON LINKEDIN.
|
|
867
|
+
mentionned_in_news: LinkedIn native filter: MENTIONNED IN NEWS.
|
|
868
|
+
persona: LinkedIn native filter: PERSONA.
|
|
869
|
+
account_lists: LinkedIn native filter: ACCOUNT LISTS.
|
|
870
|
+
lead_lists: LinkedIn native filter: LEAD LISTS.
|
|
871
|
+
viewed_profile_recently: LinkedIn native filter: PEOPLE YOU INTERACTED WITH / VIEWED PROFILE.
|
|
872
|
+
messaged_recently: LinkedIn native filter: PEOPLE YOU INTERACTED WITH / MESSAGED.
|
|
873
|
+
include_saved_leads: LinkedIn native filter: SAVED LEADS AND ACCOUNTS / ALL MY SAVED LEADS.
|
|
874
|
+
include_saved_accounts: LinkedIn native filter: SAVED LEADS AND ACCOUNTS / ALL MY SAVED ACCOUNTS.
|
|
875
|
+
|
|
876
|
+
Returns:
|
|
877
|
+
A dictionary containing search results and pagination details.
|
|
878
|
+
|
|
879
|
+
Raises:
|
|
880
|
+
httpx.HTTPError: If the API request fails.
|
|
881
|
+
|
|
882
|
+
Tags:
|
|
883
|
+
linkedin, sales_navigator, people, search, advanced, api, important
|
|
884
|
+
"""
|
|
885
|
+
url = f"{self.base_url}/api/v1/linkedin/search"
|
|
886
|
+
|
|
887
|
+
params: dict[str, Any] = {"account_id": account_id}
|
|
888
|
+
if cursor:
|
|
889
|
+
params["cursor"] = cursor
|
|
890
|
+
if limit is not None:
|
|
891
|
+
params["limit"] = limit
|
|
892
|
+
|
|
893
|
+
payload: dict[str, Any] = {"api": "sales_navigator", "category": "people"}
|
|
894
|
+
|
|
895
|
+
# Add all the Sales Navigator specific parameters
|
|
896
|
+
sn_params = {
|
|
897
|
+
"keywords": keywords,
|
|
898
|
+
"last_viewed_at": last_viewed_at,
|
|
899
|
+
"saved_search_id": saved_search_id,
|
|
900
|
+
"recent_search_id": recent_search_id,
|
|
901
|
+
"location": location,
|
|
902
|
+
"location_by_postal_code": location_by_postal_code,
|
|
903
|
+
"industry": industry,
|
|
904
|
+
"first_name": first_name,
|
|
905
|
+
"last_name": last_name,
|
|
906
|
+
"tenure": tenure,
|
|
907
|
+
"groups": groups,
|
|
908
|
+
"school": school,
|
|
909
|
+
"profile_language": profile_language,
|
|
910
|
+
"company": company,
|
|
911
|
+
"company_headcount": company_headcount,
|
|
912
|
+
"company_type": company_type,
|
|
913
|
+
"company_location": company_location,
|
|
914
|
+
"tenure_at_company": tenure_at_company,
|
|
915
|
+
"past_company": past_company,
|
|
916
|
+
"function": function,
|
|
917
|
+
"role": role,
|
|
918
|
+
"tenure_at_role": tenure_at_role,
|
|
919
|
+
"seniority": seniority,
|
|
920
|
+
"past_role": past_role,
|
|
921
|
+
"following_your_company": following_your_company,
|
|
922
|
+
"viewed_your_profile_recently": viewed_your_profile_recently,
|
|
923
|
+
"network_distance": network_distance,
|
|
924
|
+
"connections_of": connections_of,
|
|
925
|
+
"past_colleague": past_colleague,
|
|
926
|
+
"shared_experiences": shared_experiences,
|
|
927
|
+
"changed_jobs": changed_jobs,
|
|
928
|
+
"posted_on_linkedin": posted_on_linkedin,
|
|
929
|
+
"mentionned_in_news": mentionned_in_news,
|
|
930
|
+
"persona": persona,
|
|
931
|
+
"account_lists": account_lists,
|
|
932
|
+
"lead_lists": lead_lists,
|
|
933
|
+
"viewed_profile_recently": viewed_profile_recently,
|
|
934
|
+
"messaged_recently": messaged_recently,
|
|
935
|
+
"include_saved_leads": include_saved_leads,
|
|
936
|
+
"include_saved_accounts": include_saved_accounts,
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
# Only add parameters that are not None
|
|
940
|
+
payload.update({k: v for k, v in sn_params.items() if v is not None})
|
|
941
|
+
|
|
942
|
+
response = self._post(url, params=params, data=payload)
|
|
943
|
+
return self._handle_response(response)
|
|
944
|
+
|
|
945
|
+
def company_search(
|
|
946
|
+
self,
|
|
947
|
+
account_id: str,
|
|
948
|
+
cursor: str | None = None,
|
|
949
|
+
limit: int | None = None,
|
|
950
|
+
keywords: str | None = None,
|
|
951
|
+
last_viewed_at: int | None = None,
|
|
952
|
+
saved_search_id: str | None = None,
|
|
953
|
+
recent_search_id: str | None = None,
|
|
954
|
+
location: dict[str, Any] | None = None,
|
|
955
|
+
location_by_postal_code: dict[str, Any] | None = None,
|
|
956
|
+
industry: dict[str, Any] | None = None,
|
|
957
|
+
company_headcount: list[dict[str, Any]] | None = None,
|
|
958
|
+
company_type: list[str] | None = None,
|
|
959
|
+
company_location: dict[str, Any] | None = None,
|
|
960
|
+
following_your_company: bool | None = None,
|
|
961
|
+
account_lists: dict[str, Any] | None = None,
|
|
962
|
+
include_saved_accounts: bool | None = None,
|
|
963
|
+
) -> dict[str, Any]:
|
|
964
|
+
"""
|
|
965
|
+
Performs a comprehensive LinkedIn Sales Navigator company search with relevant parameters.
|
|
966
|
+
This function provides access to LinkedIn's advanced Sales Navigator search capabilities
|
|
967
|
+
for finding companies with precise targeting options.
|
|
968
|
+
|
|
969
|
+
Args:
|
|
970
|
+
account_id: The ID of the Unipile account to perform the search from (REQUIRED).
|
|
971
|
+
cursor: Pagination cursor for the next page of entries.
|
|
972
|
+
limit: Number of items to return.
|
|
973
|
+
keywords: LinkedIn native filter: KEYWORDS.
|
|
974
|
+
last_viewed_at: Unix timestamp for saved search filtering.
|
|
975
|
+
saved_search_id: ID of saved search (overrides other parameters).
|
|
976
|
+
recent_search_id: ID of recent search (overrides other parameters).
|
|
977
|
+
location: LinkedIn native filter: GEOGRAPHY.
|
|
978
|
+
location_by_postal_code: Location filter by postal code.
|
|
979
|
+
industry: LinkedIn native filter: INDUSTRY.
|
|
980
|
+
company_headcount: LinkedIn native filter: COMPANY HEADCOUNT. Example {"min": 10, "max": 100}
|
|
981
|
+
company_type: LinkedIn native filter: COMPANY TYPE.
|
|
982
|
+
company_location: LinkedIn native filter: COMPANY HEADQUARTERS LOCATION.
|
|
983
|
+
following_your_company: LinkedIn native filter: FOLLOWING YOUR COMPANY.
|
|
984
|
+
account_lists: LinkedIn native filter: ACCOUNT LISTS.
|
|
985
|
+
include_saved_accounts: LinkedIn native filter: SAVED LEADS AND ACCOUNTS / ALL MY SAVED ACCOUNTS.
|
|
986
|
+
|
|
987
|
+
Returns:
|
|
988
|
+
A dictionary containing search results and pagination details.
|
|
989
|
+
|
|
990
|
+
Raises:
|
|
991
|
+
httpx.HTTPError: If the API request fails.
|
|
992
|
+
|
|
993
|
+
Tags:
|
|
994
|
+
linkedin, sales_navigator, companies, search, advanced, api, important
|
|
995
|
+
"""
|
|
996
|
+
url = f"{self.base_url}/api/v1/linkedin/search"
|
|
997
|
+
|
|
998
|
+
params: dict[str, Any] = {"account_id": account_id}
|
|
999
|
+
if cursor:
|
|
1000
|
+
params["cursor"] = cursor
|
|
1001
|
+
if limit is not None:
|
|
1002
|
+
params["limit"] = limit
|
|
1003
|
+
|
|
1004
|
+
payload: dict[str, Any] = {"api": "sales_navigator", "category": "companies"}
|
|
1005
|
+
|
|
1006
|
+
# Add all the Sales Navigator company-specific parameters
|
|
1007
|
+
sn_params = {
|
|
1008
|
+
"keywords": keywords,
|
|
1009
|
+
"last_viewed_at": last_viewed_at,
|
|
1010
|
+
"saved_search_id": saved_search_id,
|
|
1011
|
+
"recent_search_id": recent_search_id,
|
|
1012
|
+
"location": location,
|
|
1013
|
+
"location_by_postal_code": location_by_postal_code,
|
|
1014
|
+
"industry": industry,
|
|
1015
|
+
"company_headcount": company_headcount,
|
|
1016
|
+
"company_type": company_type,
|
|
1017
|
+
"company_location": company_location,
|
|
1018
|
+
"following_your_company": following_your_company,
|
|
1019
|
+
"account_lists": account_lists,
|
|
1020
|
+
"include_saved_accounts": include_saved_accounts,
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
# Only add parameters that are not None
|
|
1024
|
+
payload.update({k: v for k, v in sn_params.items() if v is not None})
|
|
1025
|
+
|
|
1026
|
+
response = self._post(url, params=params, data=payload)
|
|
1027
|
+
return self._handle_response(response)
|
|
1028
|
+
|
|
781
1029
|
def retrieve_user_profile(
|
|
782
1030
|
self,
|
|
783
1031
|
identifier: str,
|
|
@@ -785,18 +1033,18 @@ class UnipileApp(APIApplication):
|
|
|
785
1033
|
) -> dict[str, Any]:
|
|
786
1034
|
"""
|
|
787
1035
|
Retrieves a specific LinkedIn user's profile using their public or internal ID, authorized via the provided `account_id`. Unlike `retrieve_own_profile`, which fetches the authenticated user's details, this function targets and returns data for any specified third-party user profile on the platform.
|
|
788
|
-
|
|
1036
|
+
|
|
789
1037
|
Args:
|
|
790
1038
|
identifier: Can be the provider's internal id OR the provider's public id of the requested user.For example, for https://www.linkedin.com/in/manojbajaj95/, the identifier is "manojbajaj95".
|
|
791
|
-
|
|
1039
|
+
|
|
792
1040
|
account_id: The ID of the Unipile account to perform the request from (REQUIRED).
|
|
793
|
-
|
|
1041
|
+
|
|
794
1042
|
Returns:
|
|
795
1043
|
A dictionary containing the user's profile details.
|
|
796
|
-
|
|
1044
|
+
|
|
797
1045
|
Raises:
|
|
798
1046
|
httpx.HTTPError: If the API request fails.
|
|
799
|
-
|
|
1047
|
+
|
|
800
1048
|
Tags:
|
|
801
1049
|
linkedin, user, profile, retrieve, get, api, important
|
|
802
1050
|
"""
|
|
@@ -824,4 +1072,6 @@ class UnipileApp(APIApplication):
|
|
|
824
1072
|
self.create_post_comment,
|
|
825
1073
|
self.create_reaction,
|
|
826
1074
|
self.search,
|
|
1075
|
+
self.people_search,
|
|
1076
|
+
self.company_search,
|
|
827
1077
|
]
|