Skip to main content
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 best website in the world",
"html": "<string>",
"markdown": "<string>"
}
]

Description

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

Authorizations

X-API-Key
string
header
required

The unique API Key required to authorize API access. Learn how to get yours in the “Get your API key” section of the documentation.

Body

application/json
urls
string<uri>[]

Array of URLs to fetch the contents from.

format
enum<string>

The format of the content to be returned.

Available options:
html,
markdown
Example:

"html"

Response

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

url
string<uri>

The webpage URL whose content has been fetched.

Example:

"https://www.you.com"

title
string

The title of the web page.

Example:

"The best website in the world"

html
string | null

The retrieved HTML content of the web page.

markdown
string | null

The retrieved Markdown content of the web page.

I