API Reference

Use the Sinyx API to cleanly extract article content and convert it to formatting-preserved Markdown for LLMs and Data Pipelines.

Authentication

The API is syndicated through RapidAPI. To authenticate, you must pass your unique RapidAPI key in the headers.

Extraction Endpoint

POST
https://url-to-markdown2.p.rapidapi.com/v1/extract

Request Body Details

Parameter (JSON) Type Required Description
url String | Array Yes The absolute target URL(s) to scrape. Pass an array for concurrent batching (max 5).
selector String No A CSS selector to precision-target specific DOM content (e.g. .article-body).
metadata Boolean No If true, includes extra fields like title and excerpt in the response. Default: false.

Code Example: Single URL (cURL)

curl --request POST \
  --url https://url-to-markdown2.p.rapidapi.com/v1/extract \
  --header 'Content-Type: application/json' \
  --header 'x-rapidapi-host: url-to-markdown2.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_KEY' \
  --data '{"url": "https://sinyx.me"}'

Code Example: Batch Processing (cURL)

Extract up to 5 URLs in parallel. If one fails, the others still succeed.

curl --request POST \
  --url https://url-to-markdown2.p.rapidapi.com/v1/extract \
  --header 'Content-Type: application/json' \
  --header 'x-rapidapi-host: url-to-markdown2.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_KEY' \
  --data '{"url": ["https://apple.com", "https://github.com"], "metadata": true}'

Code Example: Batch Processing (Python)

import requests

url = "https://url-to-markdown2.p.rapidapi.com/v1/extract"
payload = { 
    "url": [
        "https://apple.com",
        "https://github.com"
    ],
    "metadata": True
}
headers = {
    "x-rapidapi-key": "YOUR_KEY",
    "x-rapidapi-host": "url-to-markdown2.p.rapidapi.com",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())