SERP and On-Page Data API

Samuel Schmitt

Looking for a SERP and On-Page API returning: 

You are at the right place. 

With thruuu, you have an

You can now automate your SERP Analysis with an awesome SERP API.

Getting Started with the thruuu SERP API

In this guide, we’ll cover how to access the SERP API endpoints, make API calls, and work with the returned data.

Note: If you don’t yet have an account and API key, please read this page first.

Request Builder

Within the API dashboard, you’ll find the Request Builder, a helpful tool to structure your API requests correctly.

We recommend using it as you familiarize yourself with the API to ensure proper setup.

Making Your First Call to the SERP API

The SERP API endpoint returns a comprehensive Google SERP, including statistics and on-page data for each result. To retrieve the data, you’ll need to set up a webhook endpoint in your application.

To call the endpoint, make the following HTTP request:

POST https://api.thruuu.com/api/v2/serps

Request Headers:

{
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_TOKEN"
}

Request Body:

{
    "keywords": ["seo", "seo tool"],
    "parameters": {
        "search_engine": "google.com",
        "location": null,
        "country": "US",
        "language": "en",
        "device": "desktop",
        "search_volume": true,
        "num": 20,
        "analyze_content": false,
        "analyze_headings": false,
        "analyze_top_topics": false
    },
    "reference": null,
    "webhook_url": null,
    "minified_response": false
}

Explanation of Key Parameters:

API Response

Upon successfully initiating a bulk request, you’ll receive the following response:

{
   "message": "Bulk API initiated successfully",
   "success": true,
   "id": "670a7acabcfc2555366172ea",
   "credits": {
       "free": 5,
       "paid": 0,
       "sub": 500
   }
}

Since the process can take longer than 30 seconds, the thruuu API will notify your webhook endpoint with a JSON object containing the results.

Scrape AI search engines alongside the SERP

You can query ChatGPT, Gemini, Perplexity, and Google AI Mode in the same API call as your SERP scrape.

Add the include_llm parameter to a single-keyword request and the callback gains an llm_results array containing one entry per requested engine, with the AI answer, cited sources, brand mention data, and a ready-to-render markdown version of the answer.

{
    "keywords": ["best project management software"],
    "parameters": { "country": "us", "language": "en" },
    "include_llm": ["chatgpt", "gemini", "perplexity", "google_ai_mode"]
}

1 credit per engine requested, refunded automatically if an engine fails. Plan access varies (Pro is ChatGPT-only, Agency unlocks all four).

Full reference: LLM API documentation.

Setting Up a Webhook Endpoint

Below is an example in NodeJS to configure an HTTP POST endpoint to receive data from the thruuu API.

const express = require('express');
const app = express();
 
// Match the raw body to content type application/json
// If you are using Express v4 - v4.16 you need to use body-parser, not express, to retrieve the request body

app.post('/test-webhook', express.json({ type: 'application/json', limit: '50MB' }), async (req, res) => {
 console.log('request from thruuu is coming');
 if (req.body !== undefined && req.body.data !== undefined) {
   console.log(`event type:${req.body.data.eventType}`);
   console.log(`data: ${req.body.data}`);
 }
 // Return a response to acknowledge receipt of the event
 res.json({ received: true });
});
 
app.listen(8000, () => console.log('Running on port 8000'));

Override the webhook URL per request

By default, every API job sends its result to the webhook configured in your account settings. If you run multiple workflows or clients from a single API key, you can override that destination on a per-request basis with the webhook_url parameter.

{
    "keywords": ["best running shoes"],
    "parameters": { "country": "US" },
    "reference": "client-acme-q2",
    "webhook_url": "https://your-server.com/webhooks/acme-serp"
}

One webhook fires per request. If webhook_url is set, the account-level URL is not also called. Existing integrations that don’t include this parameter continue to work exactly as before — no migration needed.

Results

Once your webhook receives a notification, you’ll get a response with the data in the following format:

{
    "eventType": "bulk-scrape",
    "id": "670a7acabcfc2555366172ea",
    "reference": "YOUR REF",
    "serps": [
        { /* Data for keyword 1 */ },
        { /* Data for keyword 2 */ }
    ]
}

Key elements:

Detailed SERP Data Object

Each object in serps includes:

{
  "id": "SERP_RESULT_ID",
  "query": "KEYWORD",
  "search_url": "Google Search URL",
  "device": "desktop",
  "hl": "en",
  "gl": "us",
  "search_engine": "google",
  "number_of_results": 11500000,
  "related_searches": [ /* Related searches */ ],
  "result": [ /* SERP results */ ],
  "keywords_title": [ /* Keywords in title */ ],
  "keywords_description": [ /* Keywords in description */ ],
  "similar_questions": { /* Similar questions */ },
  "similar_headings": [ /* Common headings */ ],
  "search_volume": { /* Search volume info */ }
}

For more details, see the documentation on individual fields.

The SERP API offers additional endpoints to retrieve all the SERP analysis and get a SERP by Id

Get List of SERPs

Endpoint

Description

This endpoint returns a list of SERP results with their basic metadata, including each SERP’s query, unique ID, and other summary details.

You can use the page and itemsPerPage parameters to paginate through the list of SERPs, allowing efficient handling of large datasets.

Query Parameters

Example Request

GET https://api.thruuu.com/api/v2/serps?page=1&itemsPerPage=50


Get Single SERP by ID

Endpoint

Description

This endpoint retrieves the detailed information for a single SERP by its unique ID.

The response includes all associated metadata, on-page details, and any analysis available for the specific SERP result.

Path Parameter

Example Request

GET https://api.thruuu.com/api/v2/serps/<ID>

Get started with the thruuu SERP API 

With thruuu, you will save a lot of time analyzing the SERP and get better SEO results by crafting the perfect content.
Don’t miss this opportunity.