This guide walks you through everything you need to start using the link.sc API, from getting your API key to building your first web data pipeline.
Quick Start
1. Get Your API Key
Sign up at link.sc/register to get your free API key. The Starter plan includes 500 requests per month — no credit card required.
Your API key will look like: lsc_abc123...
2. Make Your First Fetch Request
The Fetch API converts any URL into clean, structured content:
curl -X POST https://api.link.sc/v1/fetch \
-H "x-api-key: lsc_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "markdown"
}'
3. Make Your First Search Request
The Search API provides real-time web search with content extraction:
curl -X POST https://api.link.sc/v1/search \
-H "x-api-key: lsc_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "latest AI news",
"format": "markdown",
"num_results": 5
}'
API Overview
link.sc provides two core APIs:
Fetch API (/v1/fetch)
Converts any URL into clean content. Supported output formats:
| Format | Description | Best For |
|---|---|---|
markdown |
Clean Markdown with preserved structure | LLMs, RAG pipelines |
json |
Structured JSON extraction | Data pipelines |
html |
Cleaned HTML | Custom parsing |
screenshot |
Full-page screenshot | Visual verification |
Search API (/v1/search)
Real-time web search with optional content extraction:
| Parameter | Type | Description |
|---|---|---|
q |
string | Search query |
format |
string | Output format (markdown, json) |
num_results |
number | Number of results (1-10) |
country |
string | Geo-target (ISO 3166-1 alpha-2) |
Using the Python SDK
Install the SDK:
pip install linksc
Basic usage:
import linksc
client = linksc.Client(api_key="lsc_YOUR_KEY")
# Fetch a page
result = client.fetch(
url="https://example.com",
format="markdown"
)
print(result.content)
# Search the web
results = client.search(
q="latest AI news",
format="markdown"
)
for r in results.results:
print(f"{r.title}: {r.url}")
Using the Node.js SDK
Install the SDK:
npm install linksc
Basic usage:
import { LinkSC } from 'linksc';
const client = new LinkSC({ apiKey: 'lsc_YOUR_KEY' });
// Fetch a page
const result = await client.fetch({
url: 'https://example.com',
format: 'markdown'
});
console.log(result.content);
// Search the web
const results = await client.search({
q: 'latest AI news',
format: 'markdown'
});
results.results.forEach(r => {
console.log(`${r.title}: ${r.url}`);
});
Common Use Cases
Feeding LLMs with Web Context
# Get current information for your LLM
context = client.search(q=user_question, format="markdown")
prompt = f"""Answer based on this context:
{context.results[0].content}
Question: {user_question}"""
Building a Knowledge Base
urls = ["https://docs.example.com/page1", "https://docs.example.com/page2"]
for url in urls:
page = client.fetch(url=url, format="markdown")
chunks = split_into_chunks(page.content)
vector_store.add(chunks, metadata={"source": url})
Monitoring Web Pages
import hashlib
result = client.fetch(url="https://competitor.com/pricing", format="markdown")
current_hash = hashlib.md5(result.content.encode()).hexdigest()
if current_hash != previous_hash:
notify("Pricing page changed!")
Authentication
All requests require your API key in the x-api-key header:
x-api-key: lsc_YOUR_KEY
Keep your API key secure. Never commit it to version control. Use environment variables in production:
import os
client = linksc.Client(api_key=os.environ["LINKSC_API_KEY"])
Rate Limits and Pricing
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Starter (Free) | 500 | 10 req/min |
| Professional ($49) | 25,000 | 100 req/min |
| Enterprise | Unlimited | Custom |
Next Steps
- Explore the API Reference for full endpoint documentation
- Read the Documentation for advanced features
- Check out the Dashboard to monitor your usage
Start building with link.sc today. Get your free API key in under 2 minutes.