翻篇收录说明
翻篇网页快照

Exa Contents API: Web Content and Structured Data Extraction | Exa

https://exa.ai/products/contents

最近抓取:2026-12-03 16:13:07(北京时间)

最近内容变化:2026-12-03 16:13:07(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Get clean markdown, query-relevant highlights, or JSON in your schema from any URL in one API call. Handles JavaScript-rendered pages and PDFs. $1 per 1k pages per content type.

正文摘录

Get structured data for what your task needsSend a URL and get back the full page as markdown, the passages relevant to your task, or JSON that matches your schema. Contents API handles JavaScript-rendered pages, PDFs, and complex layouts automatically.Read the docsexa.ai/docs/search/quickstartWhat types of search does Exa offer?auto~1 secondYou want the best default balance of quality and speedlite~200 msCost or latency matters most, such as high-volume or real-time workloadsdeep-lite~4 secondsThe task needs lightweight research and synthesisdeep4–15 secondsThe task requires multi-step search and stronger synthesisSend your model token-efficient contentUse Highlights to keep context small for agents, RAG, and factual lookups. Highlights strip navigation, sidebars, and boilerplate and keep the most relevant excerpts that answer the question.Where is Boeing headquartered?Exa Highlights58 tokensThe Boeing Company's corporate headquarters is located in the Crystal City neighborhood of Arlington County, Virginia, near Washington, DC. The company is organized into three primary divisions: Boeing Commercial Airplanes (BCA), Boeing Defense, Space & Security (BDS), and Boeing Global Services…en.wikipedia.org/wiki/Boeing16,116 tokensThe Boeing Company is an American multinational corporation that designs and manufactures airplanes, rotorcraft, rockets, satellites, and missiles worldwide. The company also provides leasing and product support services.The Boeing Company's corporate headquarters is located in the Crystal City neighborhood of Arlington County, Virginia, near Washington, DC. The company is organized into three primary divisions: Boeing Commercial Airplanes (BCA), Boeing Defense, Space & Security (BDS), and Boeing Global Services (BGS). In 2021, Boeing recorded $62.3 billion in sales.Choose how fresh your content needs to beControl the balance between speed and freshness for each task, whether it's answering questions about documentation or tracking breaking news. Set it to use a saved copy of the page for a faster response. When freshness matters, fetch the page live every time or set a maximum age for the saved copy.maxAgeHoursWhat Exa doesomitUse the cache, fetch when needed24Fetch if the cached copy is older than 24h0Always fetch the live page-1Cache onlynews.ycombinator.com200 OKmaxAgeHours: 0Fetched live · 0.31sexa.ai/docs/search/quickstart200 OKmaxAgeHours: -1From cache · 0.09sen.wikipedia.org/wiki/Boeing200 OKmaxAgeHours: 24From cache · 0.12sdocs.stripe.com/rate-limits200 OKDefaultFrom cache · 0.10sHighest extraction quality on WebCodeEach provider extracted the same 250 documentation pages, graded against a golden reference built from the fully rendered page.CompletenessIs the page's substantive content present, without excess?SignalHighlights groundednessExaParallelClaude web fetch82.874.259.8020406080100Completeness (0–100)WebCode contents benchmark, 250 URLs mined from coding-agent searches. Claude web fetch returned empty content for 12% of URLs. Read the methodology or rerun it from the open-source repo.Everything you can extract from a web page with Contents APIClean markdownThe full page body as markdown, without navigation and ads. Cap the length when you need to.Relevant passagesOnly the passages that answer your query.SummariesA short summary of the page, focused on the question you ask.JSON in your schemaThe fields you define in a JSON schema, returned ready to parse.Page metadataTitle, URL, author, and published date, when the page has them.ImagesThe page's main image, plus the image URLs on the page.LinksThe URLs linked from the page, up to 1,000 per page.SubpagesContent from up to 100 linked pages per request, steered toward sections like docs or pricing.Status for every URLSuccess or error for each URL, whether it came from cache or a live fetch, and the HTTP code on errors.PricingPay per page, per content type$1/1k pagesTry nowContact salesText$1/1k pagesFull page contents as clean markdownHighlights$1/1k pagesToken-efficient passages relevant to your querySummary$1/1k pagesLLM summaries and JSON schema extractionStart extracting in a few linesInstall the Python or JavaScript SDK, or call the REST endpoint directly. Pass URLs and pick the content you want back: text, highlights, or a summary.PythonJavaScriptcURLfrom exa_py import Exa exa = Exa() result = exa.get_contents( ["https://docs.stripe.com/rate-limits"], highlights={"query": "default API rate limits per second"}, ) print(result.results[0].highlights)Frequently asked questionsWhat is the Exa Contents API?The Exa Contents API is a website text extraction API and webpage content extractor for developers. Send it one or more URLs and it returns clean page content: full text as markdown, highlights relevant to your query, or a summary that can follow a JSON schema. Each result also includes page metadata: the title and URL, plus the image, favicon, author, and published date when the page has them. It handles JavaScript-rendered pages, PDFs, and complex layouts, and reports a status for every URL.How do I get JSON from a website?Send the page URL to Exa's /contents endpoint with a JSON schema in summary.schema. Exa reads the page and returns a JSON string that matches your schema, so you can parse it straight into your application. For example, a schema with a list of plans, each with a name and price, returns the plans from a pricing page as JSON. See the Contents quickstart for code in Python, JavaScript, and cURL.What is the best tool for extracting structured data from webpages?For developers building with LLMs, the best webpage structured data extraction tool returns only the content your model needs, in a format your code can use. Exa Contents API returns clean markdown, query-relevant highlights, or JSON that matches your schema from one API call. On Exa's open WebCode benchmark of 250 documentation pages, Exa's extraction scored highest on completeness (82.8 vs. 74.2 for Parallel and 59.8 for Claude web fetch) and signal (94.5 vs. 77.6 and 55.1).How do I extract clean text from a web page for an LLM?Request text from /contents to get the page body as markdown, without navigation, ads, and other page chrome. When your model only needs to answer a question about the page, request highlights with a query instead. Highlights return the relevant passages and use far fewer tokens than the full page.What are programmatic ways to extract text from a website?You can write your own scraper with an HTTP client and an HTML parser, run a headless browser for pages rendered with JavaScript, or call a website text extraction API. Scrapers and headless browsers mean maintaining parsers, proxies, and retries yourself. With Exa Contents API, you send URLs to /contents from the Python or JavaScript SDK or with cURL, and Exa fetches, renders, and cleans each page, returning clean text, markdown, and metadata from the URL.What are the best web-to-text tools?Web-to-text tools range from browser extensions and online website to text converters, which handle one page at a time, to APIs you call from code. If you're building an application or agent, use an API: Exa Contents API converts up to 100 URLs per request into clean markdown, query-relevant passages, or JSON, and reports a status for every URL. On Exa's open WebCode benchmark, Exa's extraction scored highest on completeness and signal against Parallel and Claude web fetch.How do I turn web pages into structured data for LLM training or content analysis?Send the URLs to /contents with a JSON schema in summary.schema, and Exa returns fields that match your schema for each page, ready to load into a dataset or analysis pipeline. Request text as well when you need the full page as markdown, and use the title, published date, and author metadata to label and filter results. For training data at corpus scale, talk to Exa sales about access to Exa's index.How do I automate extraction from many web pages?Call /contents from your code or a scheduled job. Each request takes up to 100 URLs, and every URL gets its own status in the response, so you can retry only the pages that failed. Set subpages to follow linked pages from a starting URL, and set maxAgeHours so each run gets content as fresh as your task needs.Can Exa extract content from PDFs and JavaScript-heavy pages?Yes. Exa handles JavaScript-rendered pages, PDFs, and complex layouts automatically. Send the URL the same way you would for any other page. Highlights and summaries work on PDFs too, so you can pull a specific result out of a research paper or report without parsing the file yourself.How fresh is the content Exa returns?By default, Exa uses cached content when it's available and fetches the page when it isn't. Set maxAgeHours to the oldest content you'll accept: Exa uses the cached copy if it's newer than that and fetches the page otherwise. Use 0 to always fetch the page, or -1 to only use the cache. livecrawlTimeout caps how long a fresh fetch can take.Can I crawl multiple pages of a website?Yes. Set subpages to follow linked pages from each starting URL, and add subpageTarget with terms such as "docs" or "pricing" to prioritize the sections you need. You can send up to 100 URLs in a single request and get up to 100 subpages per request in total.Should I use the Contents API or the Search API?Use Contents when you already have the URLs. Use Search when you need to find pages first: every Contents option is also available on /search for the results it returns. Text and highlights are included for up to 10 results per search; summaries and schema extraction are billed at $1 per 1k pages. For web search tools in agents, request highlights on /search instead of making a separate Contents call.How much does the Exa Contents API cost?Contents costs $1 per 1,000 pages for each content type: text, highlights, or summary. A page requested with both text and highlights counts as two. See pricing for volume and enterprise options.