Web

Fetch a web page as clean extracted content

Extract content from a web page as markdown, HTML, or JSON.

post/api/v1/web/fetch

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/web/fetch
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

urlstring required

URL to fetch

format'markdown' | 'html' | 'json'

Output format. 'markdown' (default) clean article text; 'html' raw cleaned HTML; 'json' the structured SSR blob (TikTok, Pinterest, etc.) instead of article text.

selectorstring

CSS selector to scope the result. An anchor-id selector (e.g. a docs anchor like '#usage') that lands on a heading expands to the heading's whole section, up to the next same-or-higher-level heading; other selectors return the matched elements themselves.

Response

Fetched content

statusinteger required
contentstring[] required
urlstring required
titlestring

Article title, when extracted from the page metadata.

authorstring

Article author/byline, when extracted from the page metadata.

published_datestring

Article publication date (ISO 8601), when extracted from the page metadata.

modified_datestring

Last-modified date (ISO 8601), when the page publishes one.

descriptionstring

Page summary, from og:description / meta description.

site_namestring

Publishing site name, from og:site_name.

sectionstring

Site section/category, from article:section.

langstring

Page language, from the html lang attribute.

imagestring

Lead image URL, from og:image / twitter:image.

faviconstring

Site favicon URL.

outcome'success' | 'teaser' | 'thin_content' | 'paywall' | 'bot_challenge' | 'consent_wall' | 'login_wall' | 'rate_limited' | 'timeout' | 'transient_upstream' | 'unsupported_target' | 'not_found' | 'error' required

Classified result type. Use this to branch your retry / strategy logic.

paywalledboolean

True when the URL is paywalled. Set alongside the real outcome (e.g. teaser, not_found, bot_challenge).

unsupported_reasonstring

When outcome=unsupported_target, why the URL pattern is permanently unsupported.

alternativesstring[]

When outcome=unsupported_target, alternative URL patterns or tools that may work.

total_charsinteger

Full extracted content length in characters, before any inline truncation.

truncatedboolean

True when content was truncated to fit the inline cap; full content at download_url.

truncated_charsinteger

Characters NOT included inline (available via download_url).

download_urlstring

Presigned HTTPS URL to download the full extracted content. Set when truncated.

file_urlstring

Presigned HTTPS URL to download the ORIGINAL file (PDF, docx, pptx, ...) this content was extracted from. Distinct from download_url, which is the extracted text. Set whenever the fetch parsed a real file - including one we identified but declined to convert, so the bytes are still reachable.

file_bytesinteger

Size of file_url's object in bytes.

file_typestring

Content type of file_url's object, e.g. application/pdf.

expires_atstring

ISO 8601 UTC timestamp when download_url / file_url expire (~1h).

Changes

No recorded changes to this operation across all 1 revision of this API.