# URL Metadata Extractor - OG Tags, Twitter Cards, Favicons (`george.the.developer/url-metadata-extractor`) Actor

Extract Open Graph tags, Twitter cards, favicons, structured data (JSON-LD), and meta tags from any URL. Perfect for link preview generation.

- **URL**: https://apify.com/george.the.developer/url-metadata-extractor.md
- **Developed by:** [George Kioko](https://apify.com/george.the.developer) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 url extracteds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## URL Metadata Extractor - OG Tags, Twitter Cards, Favicons & Structured Data

Extract **Open Graph tags**, **Twitter Card data**, **favicons**, **JSON-LD structured data**, and **meta tags** from any URL. Perfect for building **link previews**, **SEO audits**, **social media card previews**, and **content analysis tools**. No API key required.

[![URL Metadata Extractor on Apify](https://img.shields.io/badge/Apify-URL%20Metadata%20Extractor-blue)](https://apify.com/george.the.developer/url-metadata-extractor)

### Features

- **Open Graph extraction** — Get og:title, og:description, og:image, og:type, og:url, and all OG properties
- **Twitter Card extraction** — Extract twitter:card, twitter:title, twitter:description, twitter:image
- **Favicon detection** — Find favicon, apple-touch-icon, and shortcut icon URLs
- **JSON-LD structured data** — Parse all Schema.org structured data from the page
- **Meta tag extraction** — Get all meta tags (robots, viewport, author, keywords, etc.)
- **Heading structure** — Extract H1 and H2 headings for content analysis
- **Link analysis** — Count internal vs external links
- **Image count** — Total images and first image URL
- **Performance metrics** — Response time and content length
- **Redirect tracking** — Follow redirects and report final URL
- **Canonical URL** — Extract the canonical link tag
- **Bulk extraction** — Process up to 20 URLs in one request
- **Instant API** — Real-time HTTP endpoint via Apify Standby mode

### Use Cases

- **Link preview generation** — Build rich link previews like Slack, Discord, or Twitter
- **SEO auditing** — Check OG tags, meta descriptions, canonical URLs, and structured data
- **Social media tools** — Preview how URLs will look when shared on social platforms
- **Content aggregation** — Extract titles, descriptions, and images for content feeds
- **Competitive analysis** — Analyze competitor page metadata and SEO setup
- **Web scraping pipelines** — Pre-process URLs to get metadata before deep scraping
- **Bookmark managers** — Auto-populate bookmark metadata from URLs

### Input

| Field | Type | Description |
|-------|------|-------------|
| `url` | String | Single URL to extract metadata from |
| `urls` | Array | Multiple URLs to extract (max 20) |

#### Input Example

```json
{
  "url": "https://github.com"
}
```

#### Bulk Example

```json
{
  "urls": [
    "https://github.com",
    "https://twitter.com",
    "https://medium.com"
  ]
}
```

### Output

```json
{
  "url": "https://github.com",
  "final_url": "https://github.com/",
  "status_code": 200,
  "title": "GitHub: Let's build from here",
  "description": "GitHub is where over 100 million developers shape the future of software...",
  "canonical": "https://github.com/",
  "language": "en",
  "favicon": "https://github.githubassets.com/favicons/favicon.svg",
  "open_graph": {
    "title": "GitHub: Let's build from here",
    "description": "GitHub is where over 100 million developers...",
    "image": "https://github.githubassets.com/assets/social-...",
    "type": "website",
    "url": "https://github.com/"
  },
  "twitter_card": {
    "card": "summary_large_image",
    "title": "GitHub: Let's build from here",
    "description": "GitHub is where over 100 million developers...",
    "image": "https://github.githubassets.com/assets/social-..."
  },
  "meta_tags": {
    "viewport": "width=device-width",
    "robots": "index, follow"
  },
  "structured_data": [],
  "headings": {
    "h1": ["Let's build from here"],
    "h2": ["The world's leading AI-powered developer platform"]
  },
  "images": { "count": 15, "first_image": "https://..." },
  "links": { "internal": 45, "external": 12 },
  "performance": { "response_time_ms": 234, "content_length": 145023 },
  "error": null
}
```

### API Endpoints (Standby Mode)

#### GET /extract

```bash
curl "https://YOUR-STANDBY-URL/extract?url=https://github.com"
```

#### POST /extract/bulk

```bash
curl -X POST "https://YOUR-STANDBY-URL/extract/bulk" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://github.com","https://twitter.com"]}'
```

### Pricing

- **$0.003 per URL extracted**
- No charge for failed requests
- Bulk requests charge per URL

### Related Tools

- **[Website Intelligence API](https://apify.com/george.the.developer/website-intelligence-api)** — Detect technologies, analyze SEO, get full site intelligence
- **[AI Content Detector](https://apify.com/george.the.developer/ai-content-detector)** — Check if text was written by AI

Browse all tools by [george.the.developer on Apify](https://apify.com/george.the.developer).

# Actor input Schema

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

Single URL to extract metadata from

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

Array of URLs to extract metadata from (max 20)

## Actor input object example

```json
{
  "url": "https://github.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 = {
    "url": "https://github.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("george.the.developer/url-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 = { "url": "https://github.com" }

# Run the Actor and wait for it to finish
run = client.actor("george.the.developer/url-metadata-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 '{
  "url": "https://github.com"
}' |
apify call george.the.developer/url-metadata-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=george.the.developer/url-metadata-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Gj26cfSt8IBcIfeK5/builds/Qrn5GGredMolEtBhp/openapi.json
