Skip to content

Repository files navigation

PyCrowdTangle

A Python Wrapper To Retrieve Data From The CrowdTangle API

https://pypi.org/project/PyCrowdTangle

Install

pip install PyCrowdTangle

Update

pip install PyCrowdTangle -U

Example

Open In Colab

Usage

ct_get_posts

importPyCrowdTangleaspct#retrieve data from CrowdTangle# get the api_token from https://apps.crowdtangle.com/# you can locate your API token via your crowdtangle dashboard# under Settings > API Access.data=pct.ct_get_posts(api_token="AKJHXDFYTGEBKRJ6535")
importpandasaspddf=pd.DataFrame(data['result']['posts'])
#show resultsdf.head()

ct_get_links

importPyCrowdTangleaspct#retrieve data from CrowdTangle# get the api_token from https://apps.crowdtangle.com/# you can locate your API token via your crowdtangle dashboard# under Settings > API Access.data=pct.ct_get_links(link='http://www.queenonline.com/', platforms='facebook',
start_date='2019-01-01',api_token="AKJHXDFYTGEBKRJ6535")
importpandasaspddf=pd.DataFrame(data['result']['posts'])
#show resultsdf.head()

ct_get_lists

importPyCrowdTangleaspct#retrieve data from CrowdTangle# get the api_token from https://apps.crowdtangle.com/# you can locate your API token via your crowdtangle dashboard# under Settings > API Access.data=pct.ct_get_lists(api_token="AKJHXDFYTGEBKRJ6535")
#show resultsprint(data)

Acknowledgements

CooRnet has been developed as part of the project Social Media Behaviour research project activities.

The project is supported by a the Social Media and Democracy Research Grants from Social Science Research Council (SSRC). Data and tools provided by Facebook.

About

A Python Wrapper To Retrieve Data From The CrowdTangle API

Topics

Resources

Stars

11 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages