Introduction
Fast, stateless API for URL meta extraction and DNS lookups.
Welcome to the OpenMetaAPI documentation. Our API provides high-performance URL metadata extraction and DNS resolution services.
<aside>All requests require an API key passed via the <code>X-API-Key</code> header. Pro features are available to subscribers.</aside>
Authenticating requests
To authenticate requests, include a X-API-Key header with the value "{YOUR_API_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your API key from your dashboard.
DNS Resolution
Resolve DNS
requires authentication
Resolve DNS records for a given domain. Supported types for all users: A, AAAA, MX, CNAME, TXT, NS. Pro users can also resolve: SOA, PTR, SRV, CAA, ANY.
Example request:
curl --request GET \
--get "https://openmetaapi.syofyanzuhad.dev/api/v1/dns?domain=laravel.com&type=MX" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"domain\": \"!:\\/\\/):8hE.):EkR.)k{2,}\",
\"type\": \"PTR\"
}"
const url = new URL(
"https://openmetaapi.syofyanzuhad.dev/api/v1/dns"
);
const params = {
"domain": "laravel.com",
"type": "MX",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-API-Key": "{YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"domain": "!:\/\/):8hE.):EkR.)k{2,}",
"type": "PTR"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"data": {
"domain": "laravel.com",
"type": "MX",
"records": [
{
"host": "laravel.com",
"class": "IN",
"ttl": 300,
"type": "MX",
"pri": 1,
"target": "aspmx.l.google.com"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
Handle the incoming request for stress testing.
requires authentication
This endpoint is optimized for high-throughput testing.
Example request:
curl --request GET \
--get "https://openmetaapi.syofyanzuhad.dev/api/v1/internal/benchmark" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://openmetaapi.syofyanzuhad.dev/api/v1/internal/benchmark"
);
const headers = {
"X-API-Key": "{YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthorized: Invalid API Key Format"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Metadata Extraction
Extract Metadata
requires authentication
Extract comprehensive metadata from any public URL, including Title, Description, Favicon, Open Graph, and Twitter Cards. Pro users also receive JSON-LD, Keywords, Author, Canonical URL, Language, and Performance Metrics.
Example request:
curl --request GET \
--get "https://openmetaapi.syofyanzuhad.dev/api/v1/meta?url=https%3A%2F%2Flaravel.com&force=" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
\"force\": false
}"
const url = new URL(
"https://openmetaapi.syofyanzuhad.dev/api/v1/meta"
);
const params = {
"url": "https://laravel.com",
"force": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-API-Key": "{YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
"force": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"data": {
"url": "https://laravel.com",
"meta": {
"title": "Laravel - The PHP Framework For Web Artisans",
"description": "Laravel is a web application framework with expressive, elegant syntax...",
"favicon": "https://laravel.com/favicon.ico",
"open_graph": {
"og:title": "Laravel",
"og:description": "..."
},
"twitter_card": {
"twitter:card": "summary_large_image"
}
}
}
}
Example response (200, Pro User):
{
"success": true,
"data": {
"url": "https://laravel.com",
"meta": {
"title": "Laravel",
"description": "...",
"favicon": "...",
"open_graph": {},
"twitter_card": {},
"author": "Taylor Otwell",
"keywords": [
"php",
"framework"
],
"canonical": "https://laravel.com/",
"lang": "en",
"robots": "index, follow",
"json_ld": [],
"metrics": {
"fetch_duration_ms": 150.5,
"http_status": 200
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.