How to load data from Facebook Marketing to ElasticSearch
Learn how to use Airbyte to synchronize your Facebook Marketing data into ElasticSearch within minutes.


Building your pipeline or Using Airbyte
Airbyte is the only open source solution empowering data teams to meet all their growing custom business demands in the new AI era.
- Inconsistent and inaccurate data
- Laborious and expensive
- Brittle and inflexible
- Reliable and accurate
- Extensible and scalable for all your needs
- Deployed and governed your way
Start syncing with Airbyte in 3 easy steps within 10 minutes



Take a virtual tour
Demo video of Airbyte Cloud
Demo video of AI Connector Builder
Setup Complexities simplified!
Simple & Easy to use Interface
Airbyte is built to get out of your way. Our clean, modern interface walks you through setup, so you can go from zero to sync in minutes—without deep technical expertise.
Guided Tour: Assisting you in building connections
Whether you’re setting up your first connection or managing complex syncs, Airbyte’s UI and documentation help you move with confidence. No guesswork. Just clarity.
Airbyte AI Assistant that will act as your sidekick in building your data pipelines in Minutes
Airbyte’s built-in assistant helps you choose sources, set destinations, and configure syncs quickly. It’s like having a data engineer on call—without the overhead.
What sets Airbyte Apart
Modern GenAI Workflows
Move Large Volumes, Fast
An Extensible Open-Source Standard
Full Control & Security
Fully Featured & Integrated
Enterprise Support with SLAs
What our users say

Raman Singh
Predictable, straightforward pricing model that simplified budgeting and significantly reduced overall spend

Chase Zieman

“Airbyte helped us accelerate our progress by years, compared to our competitors. We don’t need to worry about connectors and focus on creating value for our users instead of building infrastructure. That’s priceless. The time and energy saved allows us to disrupt and grow faster.”

Rupak Patel
"With Airbyte, we could just push a few buttons, allow API access, and bring all the data into Google BigQuery. By blending all the different marketing data sources, we can gain valuable insights."
How to Sync to Manually
To begin, you'll need to access Facebook's Marketing API. Create a Facebook Developer account and set up a new app to obtain the necessary access tokens. This will allow you to programmatically retrieve data from Facebook's advertising platform.
Once your app is set up, generate a long-lived access token. This token is essential for authenticating API requests. Use the Facebook Graph API Explorer to generate this token, ensuring you have the required permissions (e.g., ads_read) to access the marketing data.
Write a script to call the Facebook Marketing API using the generated access token. Use endpoints such as `/act_/insights` to retrieve data like ad performance metrics. Ensure you handle pagination to retrieve all relevant data.
After retrieving the data, transform it into a JSON format suitable for Elasticsearch. This may involve restructuring the data objects, converting date formats, and ensuring all necessary fields are included and properly named.
Ensure you have an Elasticsearch cluster set up, either locally or in the cloud. You need to have an endpoint ready to receive data. Familiarize yourself with the index and document structure you'll be using.
Use an HTTP client library in your preferred programming language (e.g., Python's `requests` library) to send HTTP POST requests to the Elasticsearch cluster. For each data entry, create a JSON document and index it to the appropriate index in Elasticsearch.
After indexing the data, verify that it has been properly inserted into Elasticsearch by querying the index. Use Kibana or another tool that integrates with Elasticsearch to visualize and monitor the data. Implement error handling and logging in your script to capture any issues during the data transfer process.
By following these steps, you can successfully move data from Facebook Marketing to an Elasticsearch destination using custom scripting without relying on third-party connectors.