URL → Structured Metadata avatar

URL → Structured Metadata

Pricing

from $0.50 / 1,000 results

Go to Apify Store
URL → Structured Metadata

URL → Structured Metadata

Extract structured metadata from any public web page URL, including title, description, canonical URL, robots, language, Open Graph fields, JSON-LD types, HTTP status, and final URL.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

microautomation lab

microautomation lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Extract structured metadata from one public web page URL. Each successful run writes one record to the Default Dataset.

Actor: microautomationlab/url-structured-metadata

What it extracts

FieldSource or meaning
urlOriginal input URL.
titleText of the HTML <title> element.
descriptionContent of meta name="description".
canonicalhref of a link element whose rel includes canonical.
robotsContent of meta name="robots".
languageThe <html> element's lang attribute.
ogTitleContent of meta property="og:title".
ogDescriptionContent of meta property="og:description".
ogImageContent of meta property="og:image".
jsonLdTypesUnique @type strings from valid JSON-LD blocks.
httpStatusHTTP status code of the final response.
finalUrlResponse URL after following HTTP redirects.

Metadata strings are trimmed. Missing or empty metadata values are null; when no JSON-LD types are found, jsonLdTypes is [].

For title, meta, and canonical elements, the first matching element is used. Relative references in canonical and ogImage are returned as found, without conversion to absolute URLs. Missing values are not inferred from other tags.

JSON-LD types are collected from objects, arrays, @graph, and nested objects, with duplicates removed in discovery order. Malformed JSON-LD blocks are skipped without discarding other metadata. This discovers type names; it does not validate structured data.

Input

Provide one absolute HTTP or HTTPS URL in the required url field:

{
"url": "https://example.com/"
}

1 run = 1 URL. URL lists are not supported. URLs containing a username or password are rejected. Use a publicly accessible page that does not require authentication.

Output

A successful run saves one record to the Default Dataset and prints the same record to standard output. The Actor output's results link points to the dataset items.

Example record from an existing local run for https://example.com/ (page content can change):

{
"url": "https://example.com/",
"title": "Example Domain",
"description": null,
"canonical": null,
"robots": null,
"language": "en",
"ogTitle": null,
"ogDescription": null,
"ogImage": null,
"jsonLdTypes": [],
"httpStatus": 200,
"finalUrl": "https://example.com/"
}

Typical use cases

  • Metadata inspection for a specific page.
  • Open Graph metadata checks.
  • Canonical and robots meta tag inspection.
  • Structured data type discovery through JSON-LD @type values.
  • Lightweight automation workflows that consume a single metadata record.

Limitations

  • One URL per run.
  • Not a crawler; does not follow site links. HTTP redirects are followed.
  • Does not perform SEO scoring or provide recommendations.
  • Does not use AI or an LLM.
  • Does not execute JavaScript. JavaScript-rendered metadata that is not present in the fetched HTML may not be available.
  • Intended for publicly accessible HTTP/HTTPS pages.
  • Accepts responses with Content-Type: text/html or application/xhtml+xml only.
  • HTTP fetching has a 15-second timeout, including redirects and reading the response body.

Error behavior

The following input and fetch errors end the run with exit code 1. They occur before the dataset write, so no result or error record is saved to the Dataset for these failures.

Error codeCondition
INVALID_URLMissing or invalid input URL, a non-HTTP(S) URL, or a URL containing a username or password.
HTTP_ERRORA non-2xx HTTP response, such as 404 or 500.
NETWORK_ERRORFetch failure, such as a DNS, connection, or TLS error.
TIMEOUTThe HTTP fetch exceeds 15 seconds, including redirects and body reading.
NON_HTMLThe response Content-Type is missing or is neither HTML nor XHTML.

These errors are printed to standard error as JSON. HTTP_ERROR and NON_HTML also include httpStatus. For example:

{
"error": {
"code": "HTTP_ERROR",
"message": "HTTP 404",
"httpStatus": 404
}
}

Missing metadata and malformed JSON-LD alone do not fail a run; the output rules above apply.

Pricing

Pay per event:

  • Result: $0.50 / 1,000 results.
  • Actor start: $0.00005.

Platform usage costs are not charged to the user separately.

Privacy / data handling

The Actor reads its input through the Apify SDK and requests the supplied URL, following HTTP redirects. It reads the response HTML to extract the fields listed above.

On success, the code sends the complete metadata record, including the input URL and final URL, to the Default Dataset and prints it to standard output. The listed input and fetch errors are printed to standard error. URLs, including any query strings, can therefore appear in the saved result and successful-run log output.

Local development

Requires Node.js 22 or later and the Apify CLI.

npm install
npm test
npm run typecheck
npm run build
apify run --no-purge --input-file input.json

On Windows, use npm.cmd and apify.cmd if PowerShell's execution policy prevents running the .ps1 commands. Local dataset records are stored in storage/datasets/default/. With --no-purge, successful runs append to the existing local dataset.