나는 모든 URL에서 50개 이상의 필드를 추출하는 Screenshot & Metadata API를 구축했습니다
I’m happy to translate the article for you, but I’ll need the full text of the article (the content you’d like translated). Please paste the article’s body here, and I’ll provide the Korean translation while keeping the source line and all formatting unchanged.
What it does
- URL to Screenshot – 웹 페이지를 PNG, JPEG, 또는 WebP 형식으로 캡처합니다
- URL to PDF – 맞춤형 포맷, 여백, 방향을 지정하여 PDF를 생성합니다
- Metadata Extraction – 모든 URL에서 50개 이상의 필드를 추출합니다 (아래 참고)
- HTML to Image – 사용자 정의 HTML/CSS를 PNG/JPEG/WebP로 렌더링합니다
메타데이터 엔드포인트
하나의 GET 요청으로 추출됩니다:
기본 SEO
- title, description, keywords, author, language, charset, viewport, robots, canonical URL, generator
오픈 그래프
- og:title, og:description, og:image (+ dimensions), og:url, og:type, og:site_name, og:locale
트위터 카드
아이콘 및 테마
- favicon, apple-touch-icon, manifest, theme-color, color-scheme
콘텐츠 분석
- 첫 번째 h1 텍스트, h2 개수, 내부 링크 개수, 외부 링크 개수, 이미지 개수, 대체 텍스트 없는 이미지, 폼 개수, 스크립트 개수, 스타일시트 개수, 단어 수
구조화 데이터
- JSON‑LD (Schema.org) 파싱 및 반환
피드
- RSS/Atom 피드 자동 감지
원시 덤프
- 모든 메타 태그를 키‑값 쌍으로 표시
빠른 시작 (Python)
import requests
headers = {
"X-RapidAPI-Key": "YOUR_KEY",
"X-RapidAPI-Host": "screenshot-pdf-api.p.rapidapi.com"
}
# Screenshot a website
response = requests.get(
"https://screenshot-pdf-api.p.rapidapi.com/v1/screenshot",
headers=headers,
params={"url": "https://github.com", "width": 1280, "format": "png"}
)
with open("screenshot.png", "wb") as f:
f.write(response.content)
print(f"Saved {len(response.content)} bytes")빠른 시작 (JavaScript)
// Screenshot
const response = await fetch(
"https://screenshot-pdf-api.p.rapidapi.com/v1/screenshot?url=https://github.com&format=png",
{
headers: {
"X-RapidAPI-Key": "YOUR_KEY",
"X-RapidAPI-Host": "screenshot-pdf-api.p.rapidapi.com"
}
}
);
const blob = await response.blob();
// Metadata
const meta = await fetch(
"https://screenshot-pdf-api.p.rapidapi.com/v1/metadata?url=https://github.com",
{
headers: {
"X-RapidAPI-Key": "YOUR_KEY",
"X-RapidAPI-Host": "screenshot-pdf-api.p.rapidapi.com"
}
}
);
const data = await meta.json();
console.log(data.data.title); // "GitHub · Build and ship software..."
console.log(data.data.og_image); // "https://..."
console.log(data.data.word_count); // 834cURL
# Screenshot
curl -o screenshot.png \
-H "X-RapidAPI-Key: YOUR_KEY" \
-H "X-RapidAPI-Host: screenshot-pdf-api.p.rapidapi.com" \
"https://screenshot-pdf-api.p.rapidapi.com/v1/screenshot?url=https://github.com"
# Full page capture
curl -o fullpage.png \
-H "X-RapidAPI-Key: YOUR_KEY" \
-H "X-RapidAPI-Host: screenshot-pdf-api.p.rapidapi.com" \
"https://screenshot-pdf-api.p.rapidapi.com/v1/screenshot?url=https://en.wikipedia.org&full_page=true"엔드포인트
| 엔드포인트 | 설명 | 등급 |
|---|---|---|
GET /v1/screenshot | 스크린샷 URL을 PNG/JPEG/WebP 형식으로 변환 | Free |
GET /v1/health | API 상태 및 대기열 깊이 | Free |
GET /v1/pdf | URL에서 PDF 생성 | Basic |
GET /v1/metadata | 50개 이상의 메타데이터 필드 추출 | Basic |
POST /v1/screenshot/html | HTML/CSS를 이미지로 렌더링 | Pro |
스크린샷 매개변수
| 매개변수 | 기본값 | 설명 |
|---|---|---|
url | required | 캡처할 URL |
width | 1280 | 뷰포트 너비 |
height | 800 | 뷰포트 높이 |
format | png | png, jpeg, webp |
quality | 85 | JPEG/WebP 품질 (1‑100) |
full_page | false | 전체 스크롤 가능한 페이지 캡처 |
delay | 0 | 캡처 전 N초 대기 (0‑5) |
selector | null | 특정 요소를 캡처하기 위한 CSS 선택자 |
Use Cases
- 소셜 미디어 미리보기 – Open Graph 이미지 생성
- PDF 보고서 – 대시보드와 페이지를 PDF로 변환
- 웹 스크래핑 – 한 번의 호출로 스크린샷 + 메타데이터
- 썸네일 – 대규모 웹사이트 썸네일 생성
- SEO 감사 – OG 태그, 누락된 alt 텍스트, 구조화된 데이터 확인
- 링크 미리보기 – 풍부한 미리보기 카드 제작
- 시각적 회귀 테스트 – QA를 위한 자동 스크린샷
가격 vs 경쟁사
| 기능 | This API | ScreenshotOne | URLBox |
|---|---|---|---|
| 무료 티어 | 20/day | 100 one‑time | None |
| 기본 플랜 | $9/mo | $17/mo | $19/mo |
| 메타데이터 추출 | 50+ fields | No | No |
| JSON‑LD 파싱 | Yes | No | No |
| 콘텐츠 분석 | Yes | No | No |
사용해 보기
FastAPI와 Playwright(headless Chromium)로 구축되었습니다. Hetzner VPS에 호스팅됩니다.