POST
/
v1
/
contents
Returns the content of the web pages
curl --request POST \
  --url https://api.ydc-index.io/v1/contents \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "urls": [
    "https://www.you.com"
  ],
  "format": "html"
}'
[
{
"url": "https://www.you.com",
"title": "The title of the web page",
"html": "The HTML content of the web page",
"markdown": "The Markdown content of the web page"
}
]

Description

This endpoint returns the HTML or Markdown of a target webpage.

Errors

The endpoint returns as a structured JSON object with status, code, title, and detail fields:
HTTPCodeWhen it happens
401bad_requestThis can happen for a missing API key: {"detail": "API key is required"}, an invalid/expired API key: {"detail": "Invalid or expired API key"} or for other auth parsing errors: {"detail": "<error message>"}
403forbiddenAPI key lacks scope for the path (e.g., /v1/contents): {"detail": "Missing required scopes"}
500Internal Server Error (auth/authorization middleware)This can happen in the case of authentication failure: {"detail": "Internal authentication error"} or authorization failure: {"detail": "Internal authorization error"}

Authorizations

X-API-Key
string
header
required

A unique API Key required to authorize API access. Ensure it is kept confidential. Get a free API Key at you.com/platform.

Body

application/json
urls
string<uri>[]
format
enum<string>
Available options:
html,
markdown
Example:

"html"

Response

An array of JSON objects containing the page content of each web page

url
string<uri>
Example:

"https://www.you.com"

title
string
Example:

"The title of the web page"

html
string | null
Example:

"The HTML content of the web page"

markdown
string | null
Example:

"The Markdown content of the web page"