# 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.50 / 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.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Meta Tags Extractor - SEO & Open Graph Data",
        "description": "Extract page title, meta description, robots, canonical URL, Open Graph tags, Twitter Card tags and alternate links from web pages.",
        "version": "1.0",
        "x-build-id": "ftpwhhy2MEfGKr4by"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~meta-tags-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-meta-tags-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~meta-tags-extractor/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-meta-tags-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~meta-tags-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-meta-tags-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Web pages to extract meta tags from.",
                        "default": [
                            "https://apify.com"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
