{"id":13574071,"url":"https://github.com/josephwoodward/twitter_exporter","last_synced_at":"2026-08-03T22:31:12.028Z","repository":{"id":43511402,"uuid":"251155005","full_name":"josephwoodward/twitter_exporter","owner":"josephwoodward","description":"A Prometheus Exporter to monitor Twitter profile activity","archived":false,"fork":false,"pushed_at":"2022-03-08T00:17:28.000Z","size":14188,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T10:42:56.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josephwoodward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-29T23:21:44.000Z","updated_at":"2024-01-10T03:46:37.000Z","dependencies_parsed_at":"2022-08-23T13:11:21.197Z","dependency_job_id":null,"html_url":"https://github.com/josephwoodward/twitter_exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephwoodward%2Ftwitter_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephwoodward%2Ftwitter_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephwoodward%2Ftwitter_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephwoodward%2Ftwitter_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josephwoodward","download_url":"https://codeload.github.com/josephwoodward/twitter_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245624440,"owners_count":20645941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:00:46.021Z","updated_at":"2025-10-09T11:03:45.485Z","avatar_url":"https://github.com/josephwoodward.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Twitter Prometheus Exporter\r\n\r\nHave you ever wanted to plot Twitter followers increasing or decreasing over time and see if they correlate to an event such as a blog post or Tweet? I have, so I build this.\r\n\r\nThis Prometheus exporter will allow you to track and monitor user metrics such as follows/unfollows, tweets and more over time to give you an idea what content is increasing or decreasing your follower count.\r\n\r\n## Usage\r\n\r\nYou'll need to [Generate a twitter access token pair](https://dev.twitter.com/oauth/overview/application-owner-access-tokens).\r\nThe exporter doesn't need to post to Twitter, so you should set the newly created application's \r\npermissions model to \"Read only\".\r\n\r\nOnce that's done, export the four keys as environment variables.\r\n\r\n```bash\r\nexport TWITTER_ACCESS_TOKEN=\"...\"\r\nexport TWITTER_ACCESS_SECRET=\"...\"\r\nexport TWITTER_CONSUMER_KEY=\"...\"\r\nexport TWITTER_CONSUMER_SECRET=\"...\"\r\n```\r\n\r\nThen run the exporter, for instance:\r\n\r\n```bashm\r\ntwitter_prometheus_exporter -u=example_user\r\n```\r\n\r\n## Exported metrics\r\n\r\nThe exporter provides a set of counters that can be used to determine how frequently keywords are\r\nbeing used.\r\n\r\n| Metric | Notes                                                 |\r\n| ------ |-------------------------------------------------------|\r\n|twitter_profile_followers_total | The total number of followers of the profile.         |\r\n|twitter_profile_following_total | The total number of accounts the profile is following |\r\n|twitter_profile_tweets_total | Total number of tweets                                |\r\n|twitter_timeline_likes_total | Total number of likes across the last n tweets        |\r\n|twitter_timeline_replies_total | Total number of replies across the last n tweets      |\r\n|twitter_timeline_retweets_total | Total number of retweets across the last n tweets     |\r\n\r\nA full sample of output can be found below:\r\n\r\n```\r\ntitter_profile_followers_total{username=\"example_user\"} 1885\r\ntwitter_profile_following_total{username=\"example_user\"} 857\r\ntwitter_profile_tweets_total{username=\"example_user\"} 13935\r\ntwitter_timeline_likes_total{username=\"example_user\"} 108\r\ntwitter_timeline_replies_total{username=\"example_user\"} 8\r\ntwitter_timeline_retweets_total{username=\"example_user\"} 7\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephwoodward%2Ftwitter_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosephwoodward%2Ftwitter_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephwoodward%2Ftwitter_exporter/lists"}