Open Graph Parser

Extract og metadata entries from HTML source in document order, preserving repeated keys.

Description

Open Graph meta fields describe a resource for social previews.

Open Graph meta fields describe a resource for social previews. Repeated keys can represent multiple images or conflicting source declarations and are therefore retained.1

Extract og metadata entries from HTML source in document order, preserving repeated keys.

When to use Open Graph Parser

Use this tool to extract og metadata entries from HTML source in document order, preserving repeated keys.

Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.

How to use Open Graph Parser and understand its results

  1. Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
  2. Enter html using the field table and calculation rules, then run the tool.
  3. Read entries. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
htmlHTML source.string; maximum length: 1000000Required

Paste HTML. For each scanned meta start tag choose property before name before http-equiv, require a content attribute and test the case-sensitive og: prefix. Decode supported numeric/common named references and return ordered key/content pairs, including repeats.

entries=source-order meta key/content pairs whose raw selected key starts with 'og:'

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
entriesMetadata keys and decoded content values.list of object; minimum entries: 0; maximum entries: 100000
json
{
  "input": {
    "html": "<meta name=\"description\" content=\"A &amp; B\"><meta property=\"og:title\" content=\"Example\"><meta name=\"twitter:card\" content=\"summary\">"
  },
  "output": {
    "entries": [
      {
        "key": "og:title",
        "content": "Example"
      }
    ]
  }
}

Limitations and assumptions

This does not validate required Open Graph fields, resolve image URLs or build a rendered preview. Only a limited entity set is decoded, and script-generated metadata is not evaluated.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Twitter Card Parser: Extract twitter metadata entries from HTML source in document order, preserving repeated keys. For a complementary task, use Meta Tag Parser: Extract named meta entries from HTML source in document order, preserving repeated keys.

References

  1. Open Graph Parser — tool.io

Similar or alternative tools

  • Twitter Card Parser

    Extract twitter metadata entries from HTML source in document order, preserving repeated keys.

  • Meta Tag Parser

    Extract named meta entries from HTML source in document order, preserving repeated keys.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies