Overview

Meta Content Library API provides access to real-time data from public discussions on Facebook and Instagram, equipping researchers to study existing topics of interest as well as understand evolving or emerging topics on our platforms.

Content Library API can be accessed either through Meta's Researcher Platform or through an approved third-party cleanroom environment. The following third-party cleanroom environments are approved as of Content Library API version 4.0:

  • Inter-university Consortium for Political and Social Research (ICPSR) at the University of Michigan

User documentation for third-party cleanroom interfaces is outside the scope of the Meta Content Library API documentation and can instead be provided by the third-party's system administrator.

Downloading data from the API is not permitted

Downloading of Facebook and Instagram data from the Content Library API by any means is not permitted, regardless of whether you are accessing the API through Researcher Platform or a third-party cleanroom such as ICPSR.

Content Library API client

When you access the API through Meta's Researcher Platform, you use our Content Library API Client which runs on Jupyter and with which you can create Jupyter notebooks. Once you have created a notebook, you can import our Python3 or R Content Library API client module which allows you to perform queries using the API. See Getting started.

VPN

You access the API through our virtual private network (VPN) using OpenVPN. Follow the OpenVPN Setup instructions in Getting started to learn how to install and configure the OpenVPN client.

Data dictionary

We provide a detailed Data dictionary that describes the data names displayed in the Meta Content Library (the Name column) if applicable, and the corresponding API fields returned in Content Library API search responses (the API field column).

Meta Content Library

Meta Content Library is a web-based tool that allows researchers to explore and understand data across Facebook and Instagram by offering a comprehensive, visual, searchable collection of publicly accessible content—the same content that is also accessible through the Content Library API. The web-based user interface allows you to explore data, test out search parameters, and assess whether the resulting data is appropriate for your planned research. No knowledge of query or programming languages is needed.

Code examples

Code examples in this documentation use a tabbed code block with tabs for R and Python. Click the tab for the language of your choice to display the appropriate code. This is an example:

Click the R tab to display R code here
Click the Python tab to display Python code here

You can copy the code in either tab and paste it into a Jupyter notebook cell for the same language (R or Python).