Install the official SDK for your language, or use curl directly.
Python
pip install instaparser
JavaScript / TypeScript
npm install instaparser-api
curl — no installation required.
All API requests require your API key sent as a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
You can find your API key on the Dashboard after signing up.
Parse an article from a URL and extract its title, author, body content, images, and more.
Python
from instaparser import InstaparserClient
client = InstaparserClient(api_key="YOUR_API_KEY")
# Parse an article (HTML output)
article = client.Article(url="https://www.example.com/article")
print(article.title)
print(article.author)
print(article.words)
print(article.body) # HTML content
# Parse an article (plain text output)
article = client.Article(
url="https://www.example.com/article",
output="text"
)
print(article.text)
JavaScript / TypeScript
import { InstaparserClient } from 'instaparser-api';
const client = new InstaparserClient({ apiKey: 'YOUR_API_KEY' });
// Parse an article (HTML output)
const article = await client.article({
url: 'https://www.example.com/article'
});
console.log(article.title);
console.log(article.author);
console.log(article.words);
console.log(article.body); // HTML content
// Parse an article (plain text output)
const textArticle = await client.article({
url: 'https://www.example.com/article',
output: 'text'
});
console.log(textArticle.text);
curl
curl -X POST https://www.instaparser.com/api/1/article \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.example.com/article"}'
Example Response
{
"url": "https://www.example.com/article",
"title": "Breaking News: Technology Advances",
"site_name": "Example News",
"author": "Jane Smith",
"date": 1738368000,
"description": "A look at the latest breakthroughs in technology.",
"thumbnail": "https://www.example.com/images/thumb.jpg",
"html": "<div><p>Technology has made incredible strides...</p></div>",
"words": 1250,
"is_rtl": false,
"images": [
"https://www.example.com/images/photo1.jpg",
"https://www.example.com/images/photo2.jpg"
],
"videos": []
}
Parse a PDF from a URL or upload a file directly. Each call uses 5 credits per page.
Python
from instaparser import InstaparserClient
client = InstaparserClient(api_key="YOUR_API_KEY")
# Parse a PDF from a URL
pdf = client.PDF(url="https://www.example.com/report.pdf")
print(pdf.title)
print(pdf.words)
print(pdf.body) # HTML content
# Parse a PDF from a local file
with open("report.pdf", "rb") as f:
pdf = client.PDF(file=f)
print(pdf.title)
print(pdf.text)
JavaScript / TypeScript
import { InstaparserClient } from 'instaparser-api';
import * as fs from 'fs';
const client = new InstaparserClient({ apiKey: 'YOUR_API_KEY' });
// Parse a PDF from a URL
const pdf = await client.pdf({
url: 'https://www.example.com/report.pdf'
});
console.log(pdf.title);
console.log(pdf.words);
console.log(pdf.body); // HTML content
// Parse a PDF from a local file
const fileBuffer = fs.readFileSync('report.pdf');
const uploadedPdf = await client.pdf({ file: fileBuffer });
console.log(uploadedPdf.text);
curl (from URL)
curl "https://www.instaparser.com/api/1/pdf?url=https://www.example.com/report.pdf" \
-H "Authorization: Bearer YOUR_API_KEY"
curl (file upload)
curl -X POST https://www.instaparser.com/api/1/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@report.pdf"
Example Response
{
"url": "https://www.example.com/report.pdf",
"title": "Q4 2025 Earnings Report",
"site_name": "",
"author": "Example Corp",
"date": 1735689600,
"description": "",
"thumbnail": "",
"html": "<div><h1>Q4 2025 Earnings Report</h1><p>Revenue grew 15%...</p></div>",
"words": 4300,
"is_rtl": false,
"images": [
"https://www.example.com/report/chart1.png"
],
"videos": []
}
Generate an AI-powered summary with key sentences extracted from an article. Each call uses 10 credits.
Python
from instaparser import InstaparserClient
client = InstaparserClient(api_key="YOUR_API_KEY")
summary = client.Summary(url="https://www.example.com/article")
print(summary.overview)
print(summary.key_sentences)
# With streaming
def on_stream(line):
print(f"Stream: {line}")
summary = client.Summary(
url="https://www.example.com/article",
stream_callback=on_stream
)
JavaScript / TypeScript
import { InstaparserClient } from 'instaparser-api';
const client = new InstaparserClient({ apiKey: 'YOUR_API_KEY' });
const summary = await client.summary({
url: 'https://www.example.com/article'
});
console.log(summary.overview);
console.log(summary.keySentences);
// With streaming
const streamed = await client.summary({
url: 'https://www.example.com/article',
streamCallback: (line) => {
console.log(`Stream: ${line}`);
}
});
curl
curl -X POST https://www.instaparser.com/api/1/summary \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.example.com/article"}'
curl (with streaming)
curl -X POST https://www.instaparser.com/api/1/summary \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.example.com/article", "stream": true}'
Example Response
{
"key_sentences": [
"Technology companies reported record earnings this quarter.",
"AI adoption increased by 40% across enterprise customers.",
"Cloud infrastructure spending reached an all-time high."
],
"overview": "Tech companies had a strong quarter with record earnings driven by increased AI adoption and cloud infrastructure spending."
}
| Resource | Link |
|---|---|
| Python SDK | GitHub · pip install instaparser |
| JavaScript SDK | GitHub · npm install instaparser-api |
| Full API Reference | Article API · PDF API · Summary API |