MENU navbar-image

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"
            }
        ]
    }
}
 

Request      

GET api/v1/dns

Headers

X-API-Key        

Example: {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

domain   string     

The domain name to resolve. Example: laravel.com

type   string  optional    

The record type.
SOA, PTR, SRV, CAA, ANY are Pro Only. Default: A. Example: MX

Body Parameters

domain   string     

Must match the regex /^(?!:\/\/)(?:[a-zA-Z0-9-]+.)+[a-zA-Z]{2,}$/. Example: !://):8hE.):EkR.)k{2,}

type   string  optional    

Example: PTR

Must be one of:
  • A
  • AAAA
  • CNAME
  • MX
  • TXT
  • NS
  • SOA
  • PTR
  • SRV
  • CAA
  • ANY

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"
}
 

Request      

GET api/v1/internal/benchmark

Headers

X-API-Key        

Example: {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

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

Request      

GET api/v1/meta

Headers

X-API-Key        

Example: {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

url   string     

The URL to extract metadata from. Example: https://laravel.com

force   boolean  optional    

Bypass cache and force a fresh extraction.
Pro Only Example: false

Body Parameters

url   string     

Must be a valid URL. Must not be greater than 2048 characters. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

force   boolean  optional    

Example: false