{"title":"Collecting data from YouTube using the official API: A tutorial and a ready-to-use tool.","authors":"Kévin Campos-Moinier","doi":"10.3758/s13428-026-03116-8","DOIUrl":null,"url":null,"abstract":"<p><p>Online data from social media platforms provide an observational window into a wide range of psychological phenomena and real-world social interactions. Accessing these data typically requires the use of application programming interfaces (APIs), which are designed to ensure compliance with the legal and ethical frameworks governing the access, processing, and storage of potentially identifiable information. However, implementing API-based data collection within a dedicated program remains a major barrier for many researchers. This article addresses this challenge by introducing a ready-to-use data collection tool based on the official YouTube Data API (v3) and providing step-by-step guidance for its use. Geared toward researchers and practitioners with little or no prior programming experience, the tutorial enables users to implement transparent and reproducible API-based data collection procedures in their research. The tool and a fully documented interactive Python notebook are freely available via a public GitHub repository.</p>","PeriodicalId":8717,"journal":{"name":"Behavior Research Methods","volume":"58 8","pages":""},"PeriodicalIF":5.0000,"publicationDate":"2026-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Behavior Research Methods","FirstCategoryId":"102","ListUrlMain":"https://doi.org/10.3758/s13428-026-03116-8","RegionNum":2,"RegionCategory":"心理学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"PSYCHOLOGY, EXPERIMENTAL","Score":null,"Total":0}
引用次数: 0
Abstract
Online data from social media platforms provide an observational window into a wide range of psychological phenomena and real-world social interactions. Accessing these data typically requires the use of application programming interfaces (APIs), which are designed to ensure compliance with the legal and ethical frameworks governing the access, processing, and storage of potentially identifiable information. However, implementing API-based data collection within a dedicated program remains a major barrier for many researchers. This article addresses this challenge by introducing a ready-to-use data collection tool based on the official YouTube Data API (v3) and providing step-by-step guidance for its use. Geared toward researchers and practitioners with little or no prior programming experience, the tutorial enables users to implement transparent and reproducible API-based data collection procedures in their research. The tool and a fully documented interactive Python notebook are freely available via a public GitHub repository.
来自社交媒体平台的在线数据为广泛的心理现象和现实世界的社会互动提供了一个观察窗口。访问这些数据通常需要使用应用程序编程接口(api),这些接口的设计是为了确保符合管理访问、处理和存储潜在可识别信息的法律和道德框架。然而,在专用程序中实现基于api的数据收集仍然是许多研究人员的主要障碍。本文通过介绍一个基于官方YouTube data API (v3)的现成数据收集工具来解决这一挑战,并为其使用提供逐步指导。面向研究人员和从业人员很少或没有以前的编程经验,该教程使用户能够实现透明和可重复的基于api的数据收集程序在他们的研究。该工具和一个完整文档的交互式Python笔记本可以通过公共GitHub存储库免费获得。
期刊介绍:
Behavior Research Methods publishes articles concerned with the methods, techniques, and instrumentation of research in experimental psychology. The journal focuses particularly on the use of computer technology in psychological research. An annual special issue is devoted to this field.