Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Give an AI agent a list of URLs, but make URL fetching and metadata parsing a defined tool rather than an open-ended instruction. Have the tool return one structured result per URL, including the title, description, canonical URL, and ordered image candidates. Then render your own preview cards from those records, with explicit fallbacks when metadata is missing.

What the agent should extract

The Open Graph protocol defines four required properties for every page: og:title, og:type, og:image, and og:url (Open Graph protocol specification). For a useful link preview, also extract og:description, which is optional, and consider retaining og:site_name and og:locale as context.

  • Title: og:title.
  • Description: og:description, if present.
  • Type: og:type.
  • Canonical object URL: og:url; keep it distinct from the URL the user submitted and the final URL reached after redirects.
  • Images: collect each og:image in document order. Preserve associated structured fields such as secure URL, MIME type, width, height, and alt text when available.
  • Status: record whether fetching and parsing succeeded, and retain a per-URL error when they did not.

The protocol permits multiple values. The first value takes precedence in a conflict, but preserving every image candidate lets your application offer alternatives. Associate structured image properties with the image root they follow. The specification says an og:image:alt description should accompany an og:image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the fetching approach

Build a custom agent tool

A custom agent is appropriate when you need to control allowed URLs, redirects, parsing behavior, output shape, and how failures are reported. The OpenAI Agents SDK is a code-first framework, and its tools can fetch data or call external APIs. Keep retrieval and parsing in a narrow tool boundary; let the agent organize results or explain them, rather than granting it unrestricted network access.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Use a metadata extraction service

OpenGraph.io’s MCP documentation describes fetching Open Graph metadata, Twitter Cards, and hybrid social-preview data from URLs. Those are vendor-described capabilities, not an independent assessment. Check its current behavior, terms, pricing, limits, and data handling before relying on it. The available documentation does not establish a batch limit or throughput figure, so treat processing a list as your own orchestration unless the service documents otherwise.

Use screenshots only when you need a visual rendering

Open Graph metadata is data in a page’s HTML; it is not itself a screenshot. If your goal is to inspect a rendered page rather than extract its declared tags, ScreenshotNeo is a screenshot API and MCP server for developers. It can complement metadata extraction, but a screenshot alone does not replace parsing og: fields.

Build a repeatable list workflow

  1. Validate the input list. Accept only the URL schemes your product needs, usually HTTP or HTTPS. Set an application-level maximum list size, request timeout, response-size cap, and redirect policy. The cited documentation does not prescribe values for these limits; choose them for your workload.
  2. Fetch each URL through a dedicated tool. Do not let prompt text decide arbitrary network destinations. Apply URL and redirect checks before each request.
  3. Parse the returned HTML. Read metadata in the document head, preserve image order and related image properties, and keep the input, final, and canonical URLs separate.
  4. Return one record for every submitted URL. Include failures as records instead of dropping them, so an inaccessible page does not erase successful results from the same list.
  5. Render cards in your application. Use the extracted title, image, and description where present. Choose and document your own fallback behavior for missing values; the Open Graph specification does not define a universal fallback algorithm.
  6. Inspect only useful diagnostics. Log status and safe error details, but avoid logging secrets or private user data embedded in URLs.

For example, a suggested application schema—not an existing API response—could look like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
{
  "input_url": "https://example.com/article",
  "resolved_url": "https://www.example.com/article",
  "title": "An article title",
  "description": "A short summary",
  "type": "article",
  "canonical_url": "https://www.example.com/article",
  "images": [
    {
      "url": "https://www.example.com/preview.jpg",
      "alt": "Description of the image",
      "width": 1200,
      "height": 630
    }
  ],
  "status": "ok"
}

For failures, keep the same record shape and use a status such as fetch_error or parse_error, along with a safe, actionable error field. These status names are your application design choices, not protocol-defined values.

Security and reliability for URL fetching

Fetching arbitrary URLs is a security boundary. OpenAI’s January 28, 2026 article, “Keeping your data safe when an AI agent clicks a link,” explains that a malicious request can try to make an agent fetch a URL containing sensitive information, and that requested URLs may appear in server logs. It describes checking whether the exact URL has independently been observed publicly as a safeguard for automatic retrieval. That check does not prove the page content is trustworthy or remove every browsing risk.

For a production fetch tool, also consider these defensive controls:

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
  • Allow only the schemes and destinations your use case requires; reject credentials embedded in URLs.
  • Check every redirect destination and block internal or private-network addresses to reduce server-side request forgery risk.
  • Set connection and total timeouts, cap response bytes, and restrict content types to those your parser can safely handle.
  • Treat fetched page text as untrusted input. Metadata must not become instructions that override your agent’s system or application rules.
  • Keep API keys and other secrets out of URLs, prompts, and diagnostic logs.
  • Return timeouts, blocked requests, missing tags, and parse errors per URL so the rest of a list can still complete.

Handling incomplete or unexpected metadata

Missing tags

A page may omit some Open Graph properties or expose incomplete metadata. Preserve missing values as null or an equivalent explicit state, then apply your own documented fallback—for example, using a page title only if your application deliberately supports that behavior. Do not represent a fallback as though it came from an Open Graph tag.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Several image candidates

Keep all image roots in source order and attach width, height, MIME type, secure URL, and alt text to the correct candidate when present. The first candidate is the protocol’s preferred value in a conflict, but your preview UI can allow a user to select another.

Redirects and canonical URLs

Record the submitted URL, the final fetched URL after permitted redirects, and the page’s og:url independently. They answer different questions and can legitimately differ.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Social platform differences

Your generated card reflects the metadata your tool extracted and the rendering rules your application chose. The specification does not guarantee that a third-party social platform will display an identical preview; platforms may apply their own fetching, caching, and presentation behavior.

Or skip the browser setup

If you need a rendered screenshot alongside your metadata workflow, ScreenshotNeo returns an image or PDF from one GET request. For example, with an API key:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/article -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed, along with supported newsletter popups and chat widgets, before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers indicate the page verdict and billing status. An MCP server exposes screenshot tools for AI agents, and the free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

A URL returns no preview fields

Check whether the response contains HTML with Open Graph tags at all, whether the requested URL redirects to a different page, and whether your parser reads the final HTML document rather than assuming tags appear in every response.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Only one image appears in your result

Inspect the parser’s collection logic: it should gather every og:image root, not overwrite a single variable on each match. Keep the order and associate structured image properties with the correct root.

One bad URL stops the whole batch

Catch errors per item and return a status for each input. List processing is application orchestration; the cited agent and extraction-service material does not establish a ready-made batch job or a particular batch size.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A fetch request exposes sensitive information

Do not fetch URLs containing secrets or private data unless your security design explicitly permits it. Validate destinations and redirects, limit logging, and consider a public-URL check for automatic retrieval; that check is a safeguard, not proof of safety.

Your card differs from a social network preview

Compare the metadata your tool extracted with the target platform’s own preview behavior. Your renderer and a social platform need not use the same fields, fallback rules, cache, or fetching policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.