GPM Page Speed API

Scalable Web Performance Analysis with Google PageSpeed Insights

View API Documentation

🚀 Performance Metrics

Get detailed insights into your website's performance, including Core Web Vitals, loading times, and resource usage.

Batch Processing

Analyze multiple URLs in a single request with our queue system that optimizes API usage and prevents rate limiting.

📱 Mobile & Desktop

Test your website's performance across different devices and network conditions.

📊 Detailed Analysis

Comprehensive reports covering performance scores, resource distribution, and optimization opportunities.

🔄 Queue Management

Priority-based queue system with automatic retries and status tracking for handling high-volume requests.

💾 Results History

Store and retrieve historical performance data to track improvements over time.

API Endpoints

Our API offers several endpoints for analyzing web performance:

POST /api/pagespeed/analyze

Analyze a single URL for performance metrics

POST /api/pagespeed/batch

Analyze multiple URLs in batch mode

GET /api/pagespeed/queue

Get current status of the analysis queue

GET /api/pagespeed/batch/:batchId

Get status of a specific batch job

GET /api/pagespeed/history

Retrieve analysis history

GET /api/pagespeed/result/:id

Get specific analysis result by ID

Example Requests

Single URL Analysis
Batch Analysis
Queue Status

Analyze a Single URL

POST /api/pagespeed/analyze
Content-Type: application/json

{
    "url": "https://example.com",
    "mobile": false,
    "skipQueue": false
}

Analyze Multiple URLs

POST /api/pagespeed/batch
Content-Type: application/json

{
    "urls": [
        "https://example.com",
        "https://example.org",
        "https://example.net"
    ],
    "mobile": false,
    "priority": 1
}

Check Queue Status

GET /api/pagespeed/queue
Accept: application/json

Response Example

{
    "queueLength": 5,
    "activeJobs": 1,
    "completed": 12
}

Response Example

{
    "id": "123456",
    "url": "https://example.com",
    "timestamp": "2024-03-20T15-30-45",
    "status": "completed",
    "configuration": {
        "mobile": false
    },
    "summary": {
        "performanceScore": 86,
        "pageLoadTime": 2541.4,
        "firstPaint": 892.1,
        "requests": 24
    },
    "metrics": {
        "timings": { /* timing data */ },
        "performance": { /* scores */ },
        "resources": { /* resource breakdown */ }
    },
    "opportunities": [
        /* optimization suggestions */
    ]
}

Key Features