{"id":13439945,"url":"https://github.com/singer-io/tap-facebook","last_synced_at":"2025-04-07T07:01:36.063Z","repository":{"id":37857645,"uuid":"85717536","full_name":"singer-io/tap-facebook","owner":"singer-io","description":"Singer.io tap for Facebook Marketing API","archived":false,"fork":false,"pushed_at":"2024-04-15T16:07:51.000Z","size":962,"stargazers_count":110,"open_issues_count":51,"forks_count":143,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-04-21T14:15:00.515Z","etag":null,"topics":["singer","tap"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singer-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-21T15:16:38.000Z","updated_at":"2024-07-31T04:36:51.962Z","dependencies_parsed_at":"2023-10-20T23:08:43.158Z","dependency_job_id":"85ffa647-bf07-471e-a4f7-c148aa3fde24","html_url":"https://github.com/singer-io/tap-facebook","commit_stats":null,"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftap-facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftap-facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftap-facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftap-facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singer-io","download_url":"https://codeload.github.com/singer-io/tap-facebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608150,"owners_count":20965952,"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":["singer","tap"],"created_at":"2024-07-31T03:01:18.390Z","updated_at":"2025-04-07T07:01:36.025Z","avatar_url":"https://github.com/singer-io.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# tap-facebook\nThis is a [Singer](https://singer.io) tap that produces JSON-formatted data following the [Singer spec](https://github.com/singer-io/getting-started/blob/master/SPEC.md).\n\nThis tap:\n- Pulls raw data from the [Facebook Marketing API](https://developers.facebook.com/docs/marketing-apis)\n- Extracts the following resources from Facebook for one Ad account:\n  - Ad Creatives\n  - Ads\n  - Ad Sets\n  - Campaigns\n  - Leads\n  - Ads Insights\n    - Breakdown by age and gender\n    - Breakdown by country\n    - Breakdown by placement and device\n    - Breakdown by region\n    - Breakdown by the hour for advertisers\n- Outputs the schema for each resource\n- Incrementally pulls data based on the input state\n\n## Quick start\n\n### Install\n\nWe recommend using a virtualenv:\n\n```bash\n\u003e virtualenv -p python3 venv\n\u003e source venv/bin/activate\n\u003e pip install tap-facebook\n```\n\n### Create a Facebook Ads App\n\nTo use the Facebook Marketing API, you must create a Facebook Ads app. By creating a Facebook Ads app you will be able to use the Marketing API. [Create an app](https://developers.facebook.com/docs/marketing-apis)\n\nFacebook has three access levels for the Marketing API. You can use this Tap with all three levels. Learn more about these levels in [Facebook documentation](https://developers.facebook.com/docs/marketing-api/access). https://developers.facebook.com/docs/marketing-api/access\n\n### Get an access token\n\nThe Tap will need to use an access token to make authenticated requests to the Marketing API.\n\n### Create the config file\n\nThe Facebook Tap will use an access token generated by the OAuth process. Additionally you will need:\n\n  **start_date** - an initial date for the Tap to extract data  \n  **account_id** - The Facebook Ad account id use when extracting data\n  **access_token** - Token generated by Facebook OAuth handshake\n\nThe following is an example of the required configuration\n\n```json\n{\"start_date\":\"\",\n\"account_id\":\"\",\n\"access_token\":\"\"}\n```\n\n### Create a properties file\n\nThe properties file will indicate what streams and fields to replicate from the Facebook Marketing API. The Tap takes advantage of the Singer best practices for [schema discovery and property selection](https://github.com/singer-io/getting-started/blob/master/docs/DISCOVERY_MODE.md#discovery-mode).\n\n### [Optional] Create the initial state file\n\nYou can provide JSON file that contains a date for the streams to force the application to only fetch data newer than those dates. If you omit the file it will fetch all data for the selected streams.\n\n```json\n{\"ads\":\"2017-01-01T00:00:00Z\",\n \"adcreative\":\"2017-01-01T00:00:00Z\",\n \"ads_insights\":\"2017-01-01T00:00:00Z\"}\n```\n\n### Run the Tap\n\n`tap-facebook -c config.json -p properties.json -s state.json`\n\n---\n\nCopyright \u0026copy; 2018 Stitch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinger-io%2Ftap-facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinger-io%2Ftap-facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinger-io%2Ftap-facebook/lists"}