For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Go to Platform
HomeSDKs & toolsAPI referencePricing
  • API reference
      • GETSearch
      • POSTSearch
      • POSTContents
      • POSTResearch
      • POSTFinance Research
  • Error handling
    • Error code reference
LogoLogo
HomeSDKs & toolsAPI referencePricing
LogoLogo
Go to Platform
API reference

Contents

|View as Markdown|Open in Claude|
POST
https://ydc-index.io/v1/contents
POST
/v1/contents
$curl -X POST https://ydc-index.io/v1/contents \
> -H "X-API-Key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "urls": [
> "https://en.wikipedia.org/wiki/Main_Page"
> ],
> "formats": [
> "html",
> "metadata"
> ]
>}'
1[
2 {
3 "url": "https://en.wikipedia.org/wiki/Main_Page",
4 "title": "Wikipedia, the free encyclopedia",
5 "html": "Wikipedia was just a dream.\ndiv class=\"frb-subheader\">\n<span class=\"frb-replaced\">December 2</span>: Readers <span class=\"frb-replaced\">in the United States</span> deserve an explanation.\n</div>\n</div>\n<div class=\"frb-message-content\">\n<p>\nPlease don't skip this 1-minute read. It's <span class=\"frb-replaced\">Tuesday</span>, <span class=\"frb-replaced\">December 2</span>, and if you're like us, you've used Wikipedia countless times. To settle an argument with a friend. To satisfy a curiosity. Whether it's 3 in the morning or afternoon, Wikipedia is useful in your life. Please give <span class=\"frb-replaced\">$2.75</span>.\n</p>\n<p>\nWikipedia's been around since 2001. Back then, it was just a wildly ambitious, probably impossible dream. But it came together piece by piece—created by people, not machines. Wikipedia's not perfect, but it's always been free thanks to everyday readers.\n</p>\n<p>\nOnly 2% ever donate. But that small group makes a big difference. When you support Wikipedia, you're standing up for something simple",
6 "metadata": {
7 "site_name": "Wikipedia",
8 "favicon_url": "https://api.ydc-index.io/favicon?domain=en.wikipedia.org&size=128"
9 }
10 }
11]
Returns the HTML or Markdown of a target webpage.
Was this page helpful?
Built with

Authentication

X-API-Keystring
A unique API Key is required to authorize API access. [Get your API Key with free credits](https://you.com/platform).

Request

This endpoint expects an object.
urlslist of stringsOptional
Array of URLs to fetch the contents from.
formatslist of enumsOptional

Array of content formats to return. All included formats are returned in the response. Include “metadata” to get JSON-LD and OpenGraph information, if available.

Allowed values:
crawl_timeoutintegerOptional1-60Defaults to 10
Maximum time in seconds to wait for page content. Must be between 1 and 60 seconds. Default is 10 seconds.

Response

An array of JSON objects containing the page content of each web page
urlstringformat: "uri"
The webpage URL whose content has been fetched.
titlestring
The title of the web page.
htmlstring or null
The retrieved HTML content of the web page.
markdownstring or null
The retrieved Markdown content of the web page.
metadataobject
Metadata about the web page. Only returned when 'metadata' is included in the formats array.

Errors

401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error

A unique API Key is required to authorize API access. Get your API Key with free credits.