# Meta Tags Extractor - SEO & Open Graph Data (`benthepythondev/meta-tags-extractor`) Actor

Extract page title, meta description, robots, canonical URL, Open Graph tags, Twitter Card tags and alternate links from web pages.

- **URL**: https://apify.com/benthepythondev/meta-tags-extractor.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** SEO tools, Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## Meta Tags Extractor - SEO & Open Graph Data

Extract SEO metadata from web pages: title, meta description, robots directives, canonical URL, Open Graph tags, Twitter Card tags, alternate links and the raw meta tag list. Paste URLs and export structured metadata to JSON, CSV, Excel or an API workflow.

### What is the Meta Tags Extractor?

Meta tags shape how pages appear in search results, social previews, link unfurls and SEO audits. A missing description, wrong canonical URL or broken Open Graph image can reduce click-through rates and create messy reporting. This actor extracts the important metadata from each page and normalizes it into a dataset.

The actor uses direct HTTP requests and lightweight parsing. It does not need a browser, login or proxy for normal public pages. That makes it suitable for scheduled audits, bulk checks and content QA.

### Common use cases

Use this actor to audit page titles and descriptions, verify canonical tags after a migration, check social sharing previews, collect Open Graph data for a content database, compare competitor metadata, review robots directives, or validate hreflang/alternate links.

SEO agencies can use it for quick metadata exports. Content teams can check whether new articles have the right social tags. Developers can run it before a launch. Data teams can enrich URL lists with titles, descriptions and canonical destinations.

### Input

Provide one or more web page URLs.

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

### Output

Each dataset item represents one page.

```json
{
  "input": "https://apify.com",
  "url": "https://apify.com",
  "final_url": "https://apify.com/",
  "domain": "apify.com",
  "status_code": 200,
  "title": "Apify",
  "description": "Web scraping and automation platform.",
  "robots": "index,follow",
  "canonical_url": "https://apify.com/",
  "open_graph": {
    "title": "Apify",
    "image": "https://example.com/og.png"
  },
  "twitter_card": {
    "card": "summary_large_image"
  },
  "alternates": [],
  "meta_tags": [],
  "meta_tag_count": 12,
  "error": null
}
```

### Output fields

- `title` - HTML title tag.
- `description` - meta description.
- `robots` - robots directive when present.
- `canonical_url` - canonical link resolved to an absolute URL.
- `open_graph` - `og:*` tags.
- `twitter_card` - `twitter:*` tags.
- `alternates` - alternate and hreflang links.
- `meta_tags` - all parsed meta tags.
- `meta_tag_count` - count of parsed tags.
- `final_url`, `domain`, `status_code` - request metadata.

### Why use this actor?

Metadata audits are common but tedious. This actor turns a URL list into structured fields that can be filtered, compared and monitored. Because it runs on Apify, you get scheduled runs, webhooks, datasets, exports and easy API access.

### Example workflows

Collect URLs from a sitemap, extract metadata, and filter pages with missing descriptions. Run it against campaign landing pages before launch. Compare `canonical_url` values before and after a migration. Build a social preview database by collecting Open Graph titles, descriptions and images.

For ecommerce, audit product pages for missing Open Graph images and descriptions. For publishers, check whether article templates expose the right title, description and social metadata. For SaaS websites, monitor documentation and landing pages so changes in templates do not silently remove canonical tags.

### Integration ideas

Send the output to a spreadsheet and filter missing or duplicated metadata. Store historical runs and alert when a canonical URL changes. Use this actor after a sitemap extraction to build a complete metadata inventory. Pair it with a schema markup extractor to produce a broader SEO audit dataset that covers both basic meta tags and structured data.

Marketing teams can send Open Graph fields into preview QA workflows. SEO teams can join metadata with crawl, traffic or conversion data to prioritize fixes on pages that matter most.

### Best practices

Use canonical production URLs, not preview links. Check both important templates and individual high-value pages. For JavaScript-heavy sites, direct HTML may not include metadata inserted client-side; verify critical pages manually if results look empty. Use the `final_url` field to detect redirects before judging metadata quality.

Do not judge metadata by length alone. A technically present title or description can still be duplicated, vague or misaligned with search intent. This actor gives you the structured extraction layer; your team can then score the fields using business-specific rules. For international sites, inspect `alternates` to verify that hreflang links point to the expected pages.

### Data quality notes

The actor parses common `name`, `property` and `http-equiv` meta tags. Attribute values are HTML-unescaped and whitespace-normalized. Canonical and alternate links are resolved to absolute URLs. The `meta_tags` array preserves the raw key/content pairs so advanced users can inspect tags beyond the summary fields.

### Commercial value

Metadata work is small but conversion-sensitive. Better titles can improve search click-through. Correct Open Graph images can improve social sharing. Canonical tags can prevent reporting and indexation mistakes. This actor gives teams a practical way to turn those checks into a repeatable dataset instead of a one-off manual review.

### FAQ

Does it render JavaScript?

No. It reads the server-returned HTML. Most SEO tags should be present there.

Can it extract Open Graph tags?

Yes. Open Graph tags are returned in the `open_graph` object.

Can I audit many pages?

Yes. Pass a URL list from a sitemap, spreadsheet or dataset.

Can I export to CSV?

Yes. Apify datasets can be exported to CSV, JSON, Excel and more.

### You might also like

- Sitemap URL Extractor - collect pages to audit.
- Schema Markup Extractor - extract JSON-LD structured data.
- HTTP Headers Checker - inspect technical headers.

### Keywords

meta tags extractor, SEO metadata scraper, Open Graph scraper, Twitter Card extractor, canonical checker, meta description checker, SEO audit API, Apify metadata extractor.

# Actor input Schema

## `urls` (type: `array`):

Web pages to extract meta tags from.

## Actor input object example

```json
{
  "urls": [
    "https://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 = {
    "urls": [
        "https://apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/meta-tags-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 = { "urls": ["https://apify.com"] }

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/meta-tags-extractor").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "https://apify.com"
  ]
}' |
apify call benthepythondev/meta-tags-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/meta-tags-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/6n06NoTVc5q96umDJ/builds/ftpwhhy2MEfGKr4by/openapi.json
