Skip to main content

Usage

Use uniskill_scrape to convert web pages into high-quality Markdown that AI agents can directly process and understand.

Parameters

  • url (string): The target web page URL.
  • format (string): Response format, options are markdown (default) or html.

Response Headers

Monitor your usage in real-time with our standard diagnostic headers:
HeaderDescription
X-RateLimit-LimitYour maximum RPM limit.
X-RateLimit-RemainingRemaining calls in the current window.
X-UniSkill-BalanceTotal remaining credits.
X-UniSkill-StatusExecution status.

Error Handling

Standard HTTP status codes are used to indicate success or failure:
  • 200 OK: Success.
  • 401 Unauthorized: Key is missing or invalid.
  • 429 Too Many Requests: You have hit your RPM limit.
  • 402 Payment Required: Please top up your credits on the dashboard.
# Logic: Simple scraping example
import requests

def scrape_page(target_url):
    api_url = "https://api.uniskill.ai/v1/scrape"
    # Header and payload configuration
    headers = {"Authorization": "Bearer YOUR_KEY"}
    payload = {"url": target_url, "format": "markdown"}
    
    response = requests.post(api_url, json=payload, headers=headers)
    return response.json()