ScraperFlyAI-ready Web Data API

developer api

URL to Text API for clean readable page content

ScraperFly helps teams fetch a public URL and return clean readable text for search, monitoring, AI workflows, summaries, and content pipelines without building a custom HTML cleanup layer first.

Clean text output

Turn a public URL into readable text without carrying the whole page around

Many scraping jobs do not need the full HTML document. They need the readable content: paragraphs, product copy, article text, help pages, listing descriptions, policy pages, review snippets, or monitoring text that can be searched, compared, summarized, classified, or sent into an internal pipeline.

ScraperFly keeps that path practical. Send a public URL, capture the page, render only when JavaScript is required, and return clean text when layout markup, scripts, navigation, and decorative DOM structure would only add noise. If the workflow needs headings and links, test Markdown. If it needs selectors, keep HTML. The format follows the job.

clean text less markup noise render optional AI-ready content
Developers converting a public URL into clean readable text output for downstream workflows

What is a URL to text API?

A URL to text API accepts a public URL, captures the page response, and returns readable text that an application can use without parsing the full HTML document first. It is useful when the next step cares about content meaning rather than DOM structure: search indexing, monitoring, summarization, classification, AI prompts, review workflows, or lightweight content comparison.

ScraperFly handles the capture layer for that workflow. It can fetch the public page, run browser rendering when the useful text is created by JavaScript, and return text output through the same API surface used for HTML, Markdown, metadata, screenshots, and PDFs. Your application can then store, compare, enrich, or route the text without maintaining a separate cleaning service for every target.

The important decision is not “text everywhere.” Text is powerful when markup is noise. It is weaker when the parser needs element relationships, attributes, tables, or link structure. A reliable workflow tests the target first, compares response formats, and uses text only when it preserves the content the product actually needs.

Practical takeaway: choose text output when readable content matters more than selectors, attributes, and DOM relationships.

When is text better than HTML or Markdown?

Text is the most compact output for content-first workflows. It removes the markup layer so downstream systems can focus on words, phrases, entities, sentiment, content changes, or simple matching. That makes it useful for internal search, alerting, content QA, data enrichment, and some AI workflows where structure is less important than readability.

Markdown keeps more light structure: headings, lists, and links. HTML keeps the most structure: tags, attributes, tables, and element relationships. The best choice depends on the consumer. If a team chooses text when it actually needs headings and links, it may lose useful context. If it chooses HTML when it only needs readable copy, it may spend time cleaning markup that never mattered.

Output Use it when What it preserves Trade-off
Text The workflow needs readable content for search, summaries, matching, or monitoring. Plain content with less markup noise. Most structure is removed.
Markdown AI, RAG, documentation, or review workflows benefit from headings, links, and lists. Readable content with lightweight structure. Still not ideal for precise DOM extraction.
HTML Selectors, tables, attributes, links, or DOM relationships matter. Page markup and structural clues. Requires parsing and cleanup.
Rendered text Useful content appears only after JavaScript runs. Readable content from the browser-rendered page state. Heavier than text from source HTML.
Screenshot or PDF Humans need visual proof of what the page displayed. Rendered appearance for QA or archive records. Harder to query automatically.

If you need to compare all supported outputs, use the web scraping API response formats guide. For structure-heavy workflows, start with the HTML scraping API. For AI pipelines that still benefit from headings and links, compare text with the Markdown scraping API path before locking the format.

How do you know whether a URL can return useful text?

Start with a real sample URL and inspect the response. The page may contain readable content in source HTML, or it may require browser rendering because the important text appears after JavaScript execution. It may also redirect, return the wrong locale, include a consent wall, or produce a short fallback page that technically succeeds but is useless to the content pipeline.

A good URL-to-text workflow checks final URL, status, content type, response size, source HTML, rendered state, and a small sample of the returned text. If the text is empty, duplicated, dominated by navigation, or missing the expected body content, the request profile needs adjustment before volume. That may mean rendering, wait timing, headers, cookies, sessions, country targeting, or a different output format.

Use the API Builder for this first pass. Test the same URL as source HTML, rendered HTML, text, and Markdown. Once the team can see which response contains the useful content, the production request becomes a clear contract instead of a guess.

Practical takeaway: text output is only valuable when the captured response actually contains the readable content your workflow expects.

Where does URL-to-text fit in AI, search, and monitoring workflows?

Text output is often the fastest path into systems that do not need the page layout. Search pipelines can index text. Monitoring jobs can compare text snapshots. Internal tools can classify or route pages. AI workflows can summarize, score, or enrich content when the input is already readable and compact.

That does not mean every AI workflow should use plain text. Markdown can be better when headings, lists, and links improve context. HTML can be better when the model or parser needs to understand table structure, product cards, or repeated elements. Screenshots can be useful when a human needs to verify what the page looked like at capture time.

ScraperFly gives teams one capture layer for those choices. Keep the URL, response metadata, output format, render state, and any visual proof attached to the record so the downstream system can explain where the text came from and why it should be trusted.

How can teams keep URL-to-text jobs lightweight?

Most URL-to-text jobs should begin with the simplest request. If source HTML contains the useful text, there is no reason to pay for browser execution, premium routing, or visual files on every page. Add heavier controls only when evidence shows the plain request is incomplete or unstable.

This is especially important for recurring monitoring, AI ingestion, and large content queues. A small difference in request profile can multiply quickly across thousands of URLs. Start free, test representative targets, then choose pay-as-you-go credits or a monthly credit plan once the recurring pattern is clear. Review Pricing and estimate heavier workflows with the web scraping API credit cost calculator.

Need Start with Add only when Keep it predictable by
Readable static content Text from source HTML The expected content is missing or too noisy. Keeping simple pages on the lightest profile.
JavaScript-built content Rendered text Source HTML is incomplete or a thin shell. Enabling rendering per target, not globally.
AI or RAG context Text or Markdown samples Headings and links improve the answer quality. Choosing Markdown only where structure helps.
Content monitoring Text plus response metadata Final URL, status, or size changes affect trust. Storing capture evidence with each text snapshot.
Human QA Text plus selected screenshots Someone must verify visible page state. Generating visual files only for important samples.
Practical takeaway: URL-to-text is strongest when it removes unnecessary markup while keeping enough capture evidence to trust the text.

URL to text

Turn a public web page into clean text without building a separate cleanup service

Send a URL, choose text output, add rendering only if the page needs JavaScript, and return cleaner content for search, review, RAG, summaries, or monitoring workflows.

URL
Input

Start from a public page URL

Use a simple canonical request first so the team can verify status, content type, source response, and readable content.

urlGETPOST
TXT
Clean content

Return text when markup is noise

Text output helps remove scripts, tags, navigation, and layout structure when the workflow only needs readable page content.

textcleanreadable
DOM
Optional render

Render only when needed

Enable browser rendering when the useful text appears only after JavaScript execution or hydration.

renderwaitsChromium

Controls that keep requests predictable

url

The target page to fetch, render, clean, or capture.

format

Select the response your product needs: html, text, markdown, json, screenshot, or pdf.

premium

Escalate to stronger routing for blocks, unstable targets, or geo-sensitive content.

render

Run Chromium for SPAs, JS-injected markup, screenshots, PDFs, and browser-only pages.

country

Request a country-specific route when content changes by location.

keep_headers

Forward selected request context such as user-agent, cookie, language, and referer.

render_wait

Give dynamic content a controlled extra wait before extraction or capture.

download

Return visual artifacts as downloadable files when the output is screenshot or PDF.

cURL example

Generate Markdown with the same request shape you can move into production

curl "https://scraperfly.com/api/v1?url=https%3A%2F%2Fexample.com&format=markdown" \
  -H "apikey: YOUR_API_KEY"

Text extraction fit

Confirm the content is present before choosing text output

A URL-to-text workflow should verify whether useful content is present in raw HTML or only after rendering. That keeps simple pages cheap and helps avoid empty, duplicated, or misleading text captures.

Raw HTML response mapped to visible page data
01

Raw HTML availability

Check whether the fields you need are already present in the first HTML response.

Best first test for simple pages, articles, docs, listings, and product details.

Before and after JavaScript rendering comparison
02

JavaScript dependency

Compare raw HTML with the rendered DOM or screenshot before turning on browser rendering.

Use rendering when raw HTML is only a shell and scripts create the useful content.

Cookies, consent, session and access context for scraping
03

State & access context

Identify whether cookies, consent, login boundaries, pagination, or the same visitor state affect the response.

Use sessions and headers when continuity changes the data you receive.

Regional content variations across countries and routes
04

Geo/content variation

Test whether country, language, currency, inventory, SERP, ads, or route reputation changes the result.

Use geo or premium routing only when the target proves the response varies by route.

Questions before converting a URL to text

Where is the target field?

Find whether the field exists in raw HTML, rendered DOM, an API call, structured data, a file, or a later interaction state.

What changes the response?

Sample a few URLs and compare status, final URL, content length, redirects, empty states, and visible result differences.

What context is required?

Mark any dependency on consent, locale, cookies, headers, authentication boundary, pagination, filters, or previous requests.

What does failure look like?

Define the signals for blocked, partial, stale, redirected, empty, timed-out, or region-mismatched responses before scaling.

How answers change the text request

Fetch mode

Raw HTML availability decides whether the first request can stay simple or needs rendering, waits, screenshots, or extraction.

Request context

State requirements decide whether to add headers, cookies, sessions, consent handling, or a stable visitor profile.

Routing choice

Geo and reputation findings decide whether standard routing is enough or a country/premium route is justified.

Validation rules

Known failure states become checks for retries, escalation, QA review, and deciding when a lighter profile is still complete.

Readable output path

Choose clean text when your product does not need the full DOM

Many scraping tools hand teams raw HTML and leave them to build cleanup code. ScraperFly lets developers test text, Markdown, HTML, rendered output, metadata, and visual proof so the production request matches the content workflow instead of forcing one output everywhere.

Happy team validating a project on a laptop
01 / Start easy

Easy, free start before any billing pressure

ScraperFly gives you room to test the real target first. Use free credits to check whether the page works, whether the data is present, and which controls are actually needed before you commit money to a plan. That makes the first experiment feel light: no procurement loop, no forced subscription, no guessing your monthly volume on day one.

Free creditsNo card for first testsValidate before scaling
Smiling professional working successfully with a laptop
02 / Spend smart

Affordable, flexible billing for real-world scraping volume

Not every scraping workload is a neat monthly curve. Some projects spike, some pause, and some only become recurring after the data proves value. ScraperFly supports that reality with a pay-as-you-go path plus monthly credit plans when steady volume makes sense. You can buy what you need, keep costs visible, and avoid turning a small test into an oversized subscription.

Pay as you goMonthly when usefulCost control
Developer preparing structured output from a laptop
03 / Ship faster

Response preprocessing that removes cleanup work

A cheap fetch is not enough if your team still has to build converters, cleaners, screenshots, PDF capture, and LLM-ready formatting around it. ScraperFly can return the response as HTML, clean text, Markdown, structured JSON, PDF, or image output, so your pipeline gets closer to the final asset in one request. Less glue code, fewer moving parts, faster delivery.

HTMLTextMarkdownJSONPDFImage

Where ScraperFly wins against typical alternatives

The point is not to claim every competitor is bad. The point is fit: ScraperFly is the stronger choice when you want an API-first workflow, visible request controls, flexible credits, and response formats that help you ship instead of babysitting infrastructure.

Decision pointScraperFly advantageTypical competitor tradeoff
First experimentStart with free credits and validate the real target before spending. You can prove whether raw HTML, rendering, premium routing, or country targeting is actually needed.Trials often push you quickly toward a recurring plan or hide the true cost until add-ons enter the request.
Billing modelUse pay-as-you-go credits for uneven work, then move to monthly credits only when the workload becomes predictable. This keeps small tests and project-based scraping affordable.Many tools are optimized around monthly subscriptions, fixed allowances, or tier gates that can feel heavy before volume is proven.
Request weightKeep simple pages simple. Turn on JavaScript rendering, premium routing, sessions, headers, waits, or country routing only when the response evidence says they matter.Comparable controls may exist, but they are often bundled into higher tiers, defaults, or more complex pricing profiles.
Output formatsReturn the response in the shape your product needs: HTML for parsers, text or Markdown for content pipelines, JSON for structured metadata, and PDF/image output for visual proof.Some providers focus mainly on access and leave formatting, capture, cleanup, and downstream preparation to your own code.
Developer workflowOne API surface can cover target testing, escalation, rendering, routing, sessions, headers, response formatting, and status checks. The path from prototype to production stays compact.Proxy-first tools, actor marketplaces, and crawler platforms can be powerful, but often require more glue code or a heavier operating model.
Best fitTeams that want practical web data delivery: start small, measure cost per useful result, and scale only the controls that improve the outcome.Teams with fixed high-volume contracts, custom proxy infrastructure, or broad marketplace crawler needs may prefer a more specialized platform.

Keep text jobs light

Use the lightest request that returns the text your workflow needs

URL-to-text jobs are often affordable when raw HTML contains the content. Rendering, routing, sessions, or headers should be added only when evidence shows the simple request is not enough.

A lightweight HTML request returning a simple response
01

Basic fetch

Use a basic fetch when public HTML already contains the fields you need.

Lightest request profile; keep it when the response is complete.

JavaScript rendering producing a complete DOM
02

Rendering

Use rendering when raw HTML is a shell and JavaScript completes the page.

Heavier profile; use it only when browser output changes the result.

Several requests preserving cookies and visitor state
03

Stateful session

Use sessions when cookies, consent, locale, or pagination change the response.

Heavier state profile; preserve it only when continuity matters.

Request routing through geo and higher quality routes
04

Premium routing & geo

Use premium routing or geo only when origin, country, reputation, or regional content changes the result.

Heaviest routing profile; apply it only to targets that prove they need it.

What can make URL-to-text heavier

More infrastructure work

Browser rendering, routing choices, and longer waits mean the platform has to do more than return a simple response.

More target uncertainty

Redirects, empty states, rate limits, and challenge pages often require stronger delivery options or retries.

More state to preserve

Cookies, sessions, consent, and multi-page flows add moving parts that a plain stateless fetch does not have.

More evidence to return

Screenshots, PDFs, rendered output, and richer response artifacts are useful, but they are heavier than plain HTML.

How to keep text conversion predictable

Sample before scale

Test a small URL set first and group targets by the lightest profile that returns complete data.

Do not render by default

Inspect raw HTML before turning on rendering. Many public pages already contain the data you need.

Escalate by evidence

Move up only when the response shows missing content, state dependency, geo variance, or routing problems.

Measure useful results

Optimize around valid records delivered, not raw request volume. A lighter profile is best only when it stays complete.

Text questions

Common questions about converting URLs to text

Practical answers for teams choosing between text, Markdown, HTML, rendered output, and visual proof for public URL content workflows.

Quick answers

URL to text output

For teams that need readable page content without the full HTML document.

What does a URL to text API return?

It returns readable text extracted from a public page response so applications can use page content without processing the full HTML document first.

How do I verify text output is useful?

Check final URL, status, response size, source HTML, rendered state, and a sample of the returned text before scaling the target.

Text, Markdown, or HTML

For teams deciding how much structure the downstream workflow needs.

When should I choose text instead of Markdown?

Choose text when the workflow only needs readable content. Choose Markdown when headings, links, lists, or light structure improve AI, RAG, documentation, or review workflows.

When is HTML better than text?

HTML is better when the parser needs selectors, attributes, tables, links, or DOM relationships. Text is better when markup is noise.

Dynamic page text

For targets where useful content may be created after browser execution.

Can ScraperFly return text from JavaScript-heavy pages?

Yes. If useful content is missing from source HTML, ScraperFly can render the page in Chromium and then return text from the rendered response.

Should every URL-to-text request use rendering?

No. Start without rendering and enable it only when the target proves the useful text is created by browser-side JavaScript.

AI workflows and cost

For teams sending URL text into search, summaries, monitoring, or AI pipelines.

Can text output help AI workflows?

Yes. Clean text can work well for summaries, classification, search, and lightweight analysis, especially when headings and link structure are not required.

How can I keep URL-to-text costs low?

Use the lightest request that returns usable text, add rendering or routing only when needed, and reserve screenshots or PDFs for records that need visual proof.