# Website Metadata Extractor (meta tags, sitemap, robots)  🔎 (`powerful_bachelor/website-metadata-extractor`) Actor

🔍 Website Metadata Extractor 🌐 Extract essential website data: meta tags, robots.txt, and sitemap.xml in one scan. 📊 Analyze SEO elements, crawler directives, and site structure. ✅ Perfect for SEO audits, 🔎 competitor research, and 🚀 understanding how search engines view your website.

- **URL**: https://apify.com/powerful\_bachelor/website-metadata-extractor.md
- **Developed by:** [Powerful Bachelor](https://apify.com/powerful_bachelor) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 7 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$12.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🔍 Website Metadata Extractor

The Website Metadata Extractor is a powerful tool that analyzes websites to extract critical SEO and structural information including robots.txt content, sitemap.xml data, and HTML meta tags. This actor provides valuable insights into how search engines view and index your website, helping you optimize your web presence and improve search engine rankings.

### 📊 What Data Does It Extract?

The Website Metadata Extractor collects three essential types of website metadata:

- **robots.txt**: Extracts the complete robots.txt file content, showing you which parts of your site are allowed or disallowed for search engine crawlers
- **sitemap.xml**: Retrieves and parses sitemap data, providing insights into your site's structure and page hierarchy
- **Meta Tags**: Collects all HTML meta tags from your pages, including:
  - Title tags
  - Meta descriptions
  - Open Graph tags
  - Twitter card metadata
  - Canonical URLs
  - Viewport settings
  - Robots meta directives
  - Language information
  - And other SEO-relevant meta elements

### 🚀 Key Features

- **Multi-URL Support**: Process multiple websites in a single run
- **Complete Metadata Collection**: Comprehensive extraction of all relevant SEO metadata
- **Structured Output**: Clean, organized JSON results for easy analysis
- **Error Handling**: Robust error reporting for failed extractions
- **Customizable**: Configure which metadata elements to extract
- **Fast Performance**: Efficient processing even for large websites

### 🤔 Why Extract Website Metadata?

Understanding your website's metadata is crucial for:

- 📈 **SEO Optimization**: Identify missing or poorly configured meta tags
- 🔍 **Crawler Insights**: See exactly how search engines are instructed to crawl your site
- 🗺️ **Site Structure Analysis**: Understand your website's organization through sitemap data
- 🔄 **Competitive Research**: Analyze competitor websites' metadata strategies
- 🛠️ **Technical SEO Audits**: Identify technical SEO issues related to metadata
- 📱 **Mobile Optimization**: Verify proper viewport and mobile-specific meta tags
- 🌐 **Social Media Optimization**: Ensure proper Open Graph and Twitter card implementation

### 🛠️ How to Use the Website Metadata Extractor

Using the Website Metadata Extractor is straightforward:

1. 🔑 Create a free Apify account (if you don't have one)
2. 🔍 Open the Website Metadata Extractor actor
3. ✏️ Enter the URL(s) of the website(s) you want to analyze
4. 🚀 Click "Save & Start" and wait for the extraction to complete
5. 📊 Review your structured metadata results

### 📝 Input Parameters

The actor accepts the following input:

```json
{
    "startUrls": [
        {
            "url": "https://www.apify.com/"
        }
    ]
}
```

### 📋 Output Example

The actor provides detailed information about each processed URL:

```json
{
    "url": "https://www.apify.com/",
    "robotsTxt": {
        "userAgents": {
            "*": {
                "allow": [],
                "disallow": []
            }
        }
    },
    "metaTags": {
        "viewport": "width=device-width, initial-scale=1",
        "description": "Cloud platform for web scraping, browser automation, AI agents, and data for AI. Use 4,000+ ready-made tools, code templates, or order a custom solution.",
        "keywords": "web scraper,web crawler,scraping,data extraction,API",
        "robots": "index,follow",
        "og:title": "Apify: Full-stack web scraping and data extraction platform",
        "og:description": "Cloud platform for web scraping, browser automation, AI agents, and data for AI. Use 4,000+ ready-made tools, code templates, or order a custom solution.",
        "og:url": "https://apify.com/",
        "og:site_name": "Apify",
        "og:locale": "en_IE",
        "og:image": "https://apify.com/img/og/landing.png",
        "og:image:width": "1200",
        "og:image:height": "630",
        "og:image:alt": "Apify: Full-stack web scraping and data extraction platform",
        "og:image:type": "image/png",
        "og:type": "website",
        "twitter:card": "summary_large_image",
        "twitter:creator": "@apify",
        "twitter:title": "Apify: Full-stack web scraping and data extraction platform",
        "twitter:description": "Cloud platform for web scraping, browser automation, AI agents, and data for AI. Use 4,000+ ready-made tools, code templates, or order a custom solution.",
        "twitter:image": "https://apify.com/img/og/landing.png",
        "twitter:image:width": "1200",
        "twitter:image:height": "630",
        "twitter:image:alt": "Apify: Full-stack web scraping and data extraction platform",
        "twitter:image:type": "image/png",
        "title": "Apify: Full-stack web scraping and data extraction platform"
    },
    "sitemapFileUrl": "https://api.apify.com/v2/key-value-stores/1VlJKS1Nn5097n2gN/records/www.apify.com.json?signature=c9GnJcpsTQI92nCBhkqX"
}
```

### 🔍 Use Cases

The Website Metadata Extractor is valuable for:

- **SEO Professionals**: Quickly audit websites for metadata issues
- **Digital Marketers**: Analyze competitor metadata strategies
- **Web Developers**: Verify proper implementation of meta tags
- **Content Creators**: Ensure content is properly tagged for search engines
- **Site Owners**: Monitor your website's SEO health
- **Technical Auditors**: Include metadata analysis in comprehensive site audits

### 🚀 Optimize Your Website's Visibility

The Website Metadata Extractor provides crucial insights into how search engines view your website. By understanding and optimizing your robots.txt, sitemap.xml, and meta tags, you can improve your site's visibility, search engine rankings, and overall online presence. Start extracting valuable metadata today! 🎉

# Actor input Schema

## `startUrls` (type: `array`):

URLs of HTML pages to scrape

## Actor input object example

```json
{
  "startUrls": [
    "https://www.apify.com/"
  ]
}
```

# 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 = {
    "startUrls": [
        "https://www.apify.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerful_bachelor/website-metadata-extractor").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 = { "startUrls": ["https://www.apify.com/"] }

# Run the Actor and wait for it to finish
run = client.actor("powerful_bachelor/website-metadata-extractor").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 '{
  "startUrls": [
    "https://www.apify.com/"
  ]
}' |
apify call powerful_bachelor/website-metadata-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/xfay5vxinL7FlFqff/builds/4YNQPMRm01RYjnoNY/openapi.json
