CrowdTangle
Overview
CrowdTangle is a content monitoring and social monitoring platform. In order to access this API, you must have been issued a private API key.
API
- class parsons.CrowdTangle(api_key=None)[source]
Instantiate CrowdTangle Class
- Args:
- api_key: str
A valid CrowdTangle API key. Not required if
CROWDTANGLE_API_KEY
env variable set.
- Returns:
CrowdTangle Class
- get_posts(start_date=None, end_date=None, language=None, list_ids=None, min_interations=None, search_term=None, types=None)[source]
Return advocates (person records).
- Args:
- start_date: str
Filter to the earliest date at which a post could be posted. The time is formatted as UTC (e.g.
yyyy-mm-ddThh:mm:ss
).- end_date: str
Filter to the latest date at which a post could be posted. The time is formatted as UTC (e.g.
yyyy-mm-ddThh:mm:ss
).- language: str
Filter to 2-character Locale code. Some languages require more than two characters: Chinese (Simplified) is zh-CN and Chinese (Traditional) is zh-TW.
- list_ids: list
Filter to the ids of lists or saved searches to retrieve.
- min_interactions: int
Filter to posts with total interactions above this threshold.
- search_team: str
Returns only posts that match this search term. For multiple terms, separate with commas for OR, use quotes for phrases.
- types: list
Filter to post types including: *
episode
*extra_clip
*link
*live_video
*live_video_complete
*live_video_scheduled
*native_video
*photo
*status
*trailer
*tweet
*vimeo
*vine
*youtube
If you want all live videos (whether currently or formerly live), pass include both
live_video
andlive_video_complete
parameters.The
video
type does not mean all videos, it refers to videos that are notnative_video
,youtube
orvine
.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_leaderboard(start_date=None, end_date=None, list_ids=None, account_ids=None)[source]
Return advocates (person records).
- Args:
- start_date: str
Filter to the earliest date at which a post could be posted. The time is formatted as UTC (e.g.
yyyy-mm-ddThh:mm:ss
).- end_date: str
Filter to the latest date at which a post could be posted. The time is formatted as UTC (e.g.
yyyy-mm-ddThh:mm:ss
).- list_ids: list
Filter to the ids of lists or saved searches to retrieve.
- account_ids: list
A list of CrowdTangle accountIds to retrieve leaderboard data for. This and
list_id
are mutually exclusive; if both are sent, theaccount_ids
value will be used.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_links(link, start_date=None, end_date=None, include_summary=None, platforms=None)[source]
Return posts based on a specific link.
- Args:
- link: str
The link to filter posts to.
- start_date: str
Filter to the earliest date at which a post could be posted. The time is formatted as UTC (e.g.
yyyy-mm-ddThh:mm:ss
).- end_date: str
Filter to the latest date at which a post could be posted. The time is formatted as UTC (e.g.
yyyy-mm-ddThh:mm:ss
).- include_summary: boolean
Adds a
summary
column with account statistics for each platform that has posted this link. It will look beyond the count requested to summarize across the time searched. Requires a value forstart_date
.- platforms: list
Filter by platforms
- Returns:
- Parsons Table
See Parsons Table for output options.