# Website Tech Detector (`eichan/website-tech-detector`) Actor

- **URL**: https://apify.com/eichan/website-tech-detector.md
- **Developed by:** [Eichan Jolly](https://apify.com/eichan) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / actor start

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website Tech Detector

Inspect **one user-supplied public website URL** and report visible **technology hints** from its initial HTTP response headers and (when publicly available) its first 256 KiB of HTML. Each detection explicitly names its `source` (`header` or `html`) and the observed `signal` and `evidence`.

### Who it is for

Developers, technical support staff, and site owners who want a quick, explainable view of which server, CMS, or frontend framework a public page *might* be using—without a crawler or browser automation.

### Input

Use one complete public HTTP or HTTPS URL. The prefilled example, `https://wordpress.org/`, is a real publicly accessible site associated with WordPress.

```json
{"url":"https://wordpress.org/"}
```

### Output

One dataset item per inspected website (example is **illustrative, not a verified live response**):

```json
{
  "url":"https://wordpress.org/",
  "status_code":200,
  "redirect_location":null,
  "html_scanned":true,
  "html_truncated":false,
  "technologies":[
    {"name":"nginx","source":"header","signal":"server","evidence":"Server: nginx"},
    {"name":"WordPress","source":"html","signal":"generator-meta","evidence":"meta[name=\"generator\"]: WordPress 6.0"},
    {"name":"WordPress","source":"html","signal":"framework-marker","evidence":"WordPress asset path"}
  ],
  "error":null
}
```

Each detection's `source` is only `header` or `html`. Supported hints include `Server`, `X-Powered-By`, `X-Generator`, Drupal/Next.js response headers, HTML generator meta tags, and visible WordPress, Next.js, Nuxt, Gatsby, Shopify, Angular, React, and SvelteKit markers.

### Limits and cautions

- **These detections are hints, not proof of deployed technologies.** Headers can be hidden or spoofed, proxies can mask origin servers, and HTML can reference another website's assets. A missing hint **does not** mean the technology is absent.
- This is **not** a vulnerability scan, security verdict, technology version verifier, or full-site crawler.
- It makes one HTTP GET; it **does not follow redirects**, execute JavaScript, render the page, or open links. If the URL returns a redirect, inspect the `redirect_location` and provide a new, explicitly approved URL yourself.
- A 401 or 403 means access is restricted; it will **not** attempt a login or bypass it. Common login/admin paths are refused. Use only websites whose public access and terms permit a simple GET.
- Only standard ports (80/443) and public domain names/IP resolutions are accepted. Private, loopback, and mixed public/private DNS targets are blocked; the connection is pinned to a checked address to reduce DNS-rebinding risk.
- 9-second request timeout; HTML is read up to 256 KiB with `html_truncated=true` if larger. Compressed or non-HTML responses yield header-only hints.
- No credentials, browser automation, login-wall circumvention, or third-party Python packages. Only the supplied domain is contacted.

### Run locally (Python 3.12+ recommended)

From this Actor folder:

```bash
ACTOR_INPUT_JSON='{"url":"https://wordpress.org/"}' python src/main.py
```

Alternatively create `storage/key_value_stores/default/INPUT.json`. Local dataset items are written to `storage/datasets/default/`. On Apify, the run-provided storage token writes to its default dataset (no Apify SDK).

### Verification

Reproducible offline tests and a **real `python src/main.py` subprocess smoke run** are in `tests/`. Smoke execution uses a local HTTPS server with a **test-only** certificate and a simulated response for `wordpress.org`; this is **not** evidence that the live website returned those headers or markers.

```bash
python tests/run_smoke.py
python -m unittest discover -s tests -p 'test_*.py' -v
```

Actual run output and dataset item are saved in `verification/`.

### Apify Store metadata and pricing suggestion

- Store category: `DEVELOPER_TOOLS`.
- Suggested pricing: **$0.003 per run** (`PAY_PER_EVENT` recommendation).
- `store_metadata.json` is advisory; no publishing or billing is configured.

# Actor input Schema

## `url` (type: `string`):

One public HTTP(S) page. Only its initial response is inspected; redirects are not followed.

## Actor input object example

```json
{
  "url": "https://wordpress.org/"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing the Actor's result items

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "url": "https://wordpress.org/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("eichan/website-tech-detector").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "url": "https://wordpress.org/" }

# Run the Actor and wait for it to finish
run = client.actor("eichan/website-tech-detector").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "https://wordpress.org/"
}' |
apify call eichan/website-tech-detector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eichan/website-tech-detector"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/FLZ9WypD1Cyxdka6A/builds/BSAEVEGBPV8xvIeJE/openapi.json
