Twitter Card Parser

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

Description

Twitter card metadata declares preview fields in HTML meta elements.

Twitter card metadata declares preview fields in HTML meta elements. Repeated declarations are preserved so source conflicts can be inspected rather than silently overwritten.1

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

When to use Twitter Card Parser

Use this tool to extract twitter 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 Twitter Card 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 source. The scanner handles quoted tags, comments and raw-text regions. For each meta start tag select property, otherwise name, otherwise http-equiv, require content and test the case-sensitive twitter: prefix before decoding references. Return ordered key/content entries, including repeats and empty supplied content.

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

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": "twitter:card",
        "content": "summary"
      }
    ]
  }
}

Limitations and assumptions

Only numeric and a small set of named semicolon-terminated references are decoded. This is a source scanner without browser DOM recovery, JavaScript rendering, card-field validation or preview fetching.

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 Meta Tag Parser: Extract named meta entries from HTML source in document order, preserving repeated keys. For a complementary task, use Open Graph Parser: Extract og metadata entries from HTML source in document order, preserving repeated keys.

References

  1. Twitter Card Parser — tool.io

Similar or alternative tools

  • Meta Tag Parser

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

  • Open Graph Parser

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

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