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
- 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.
- Enter html using the field table and calculation rules, then run the tool.
- Read entries. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- 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 field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| html | HTML source. | string; maximum length: 1000000 | Required |
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 field | Meaning | Value type |
|---|---|---|
| entries | Metadata keys and decoded content values. | list of object; minimum entries: 0; maximum entries: 100000 |
{
"input": {
"html": "<meta name=\"description\" content=\"A & 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
-
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.