Skip to content

API Overview

The Scraper API allows you to integrate social media data from Twitter and YouTube into your applications. This documentation provides everything you need to implement our API quickly and efficiently.

Base URL

All API requests should be made to the following base URL:

https://dev-api.scraper.lol/api

Request Format

All requests should include:

  • Your API key in the X-API-Key header
  • For public keys, origin validation headers (Origin and Referer)
  • Content-Type: application/json for POST requests

Authentication

Scraper API uses API keys for authentication. We offer two types of keys:

  1. Private Keys (sk_*) - For server-side applications
  2. Public Keys (pk_*) - For client-side applications (with origin validation)

Learn more about authentication →

Credit System

Our API uses a credit-based system for access control:

  • Each request consumes 1 credit from your account
  • Monitor your usage in your Scraper dashboard
  • Purchase additional credits as needed for your application

Response Format

All API responses are in JSON format with a consistent structure:

Success Response

{
    "username": "example_user",
    "details": {
        // Data payload
    }
}

Error Response

{
    "error": "Error message"
}

Status Codes

The API uses standard HTTP status codes:

  • 200 - Success
  • 401 - Unauthorized (invalid API key)
  • 402 - Payment Required (insufficient credits)
  • 404 - Not Found
  • 500 - Server Error

Available Endpoints

Twitter Data

Access Twitter user information and content:

YouTube Data

Access YouTube channel information and content: