oxylabs / twitch-scraper

The Twitch Scraper API allows you to extract live and historical data from Twitch.tv. It provides user profiles, chat history, streaming stats, and more in a structured format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitch Scraper API

Oxylabs promo code

Oxylabs’ Twitch Scraper is a data gathering solution allowing you to extract real-time information from an Twitch website effortlessly. This brief guide explains how an Twitch Scraper works and provides code examples to understand better how you can use it hassle-free.

How it works

You can get Twitch results by providing your own URLs to our service. We can return the HTML for any Twitch page you like.

Python code example

The example below illustrates how you can get HTML of Twitch page.

import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'universal',
    'url': 'https://www.twitch.tv/directory'
}

# Get response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('user', 'pass1'),
    json=payload,
)

# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())

Find code examples for other programming languages here

Output Example

{
  "results": [
    {
      "content": "<!DOCTYPE html><html class=\"tw-root--hover\"><head><meta charset=\"utf-8\"><title>Twitch</title><meta n ... </html>",
      "created_at": "2023-12-18 11:15:54",
      "updated_at": "2023-12-18 11:15:55",
      "page": 1,
      "url": "https://www.twitch.tv/directory",
      "job_id": "7142472540844228609",
      "status_code": 200
    }
  ]
}

With our Twitch Scraper, you can efficiently mine public data from any Twitch web page. Gather essential stream data such as viewer count, followers, or channel descriptions, to understand audience behavior and stay on top of the gaming industry trends. If you have any enquiries, our support team is available to assist you through live chat or you can email us at hello@oxylabs.io.

About

The Twitch Scraper API allows you to extract live and historical data from Twitch.tv. It provides user profiles, chat history, streaming stats, and more in a structured format.


Languages

Language:Java 30.7%Language:C# 25.1%Language:PHP 11.8%Language:Go 11.6%Language:JavaScript 9.3%Language:Python 8.2%Language:Shell 3.3%