☁️

OCR API 카탈로그 — 모델 관리 없이 API 한 줄로 텍스트 추출

Google Vision, Azure Document Intelligence, AWS Textract, Clova OCR — 가격·정확도·코드 비교

API OCR vs 셀프호스팅 OCR

API OCR:      이미지 → API 호출 → 텍스트 (모델 관리 불필요)
셀프호스팅:   pip install easyocr → 내 서버에서 실행 (모델 직접 관리)

API OCR의 장점: 설치 없음, GPU 불필요, 항상 최신 모델, 스케일링 자동.
API OCR의 단점: 비용 발생, 인터넷 필요, 데이터가 외부 서버로 전송됨.

주요 OCR API 서비스

서비스 제공사 한국어 일본어 무료 티어 특화
Cloud Vision API Google 1,000건/월 벤치마크 정확도 최고
Document Intelligence Microsoft Azure 500페이지/월 영수증·명함·계약서 전용 모델
Textract AWS 1,000페이지/월 (3개월) 표·양식 구조화 추출
Clova OCR Naver 무료 티어 있음 한국어 최강
AI OCR NTT DATA 없음 일본어 특화 (세로쓰기, 수기)
Mathpix Mathpix 20페이지/월 수식·학술 논문 전용
OCR Space a9t9 25,000건/월 무료 티어 넉넉
Eden AI Eden AI 크레딧제 여러 API를 통합 (한번에 비교)

각 API 코드 예제

1. Google Cloud Vision — 정확도 최고:

pip install google-cloud-vision

from google.cloud import vision

client = vision.ImageAnnotatorClient()

with open("document.png", "rb") as f:
    image = vision.Image(content=f.read())

response = client.text_detection(image=image)
text = response.text_annotations[0].description
print(text)
# → 이미지 속 모든 텍스트가 한번에

사전 설정: gcloud auth login + 프로젝트에 Vision API 활성화.

2. Azure Document Intelligence — 문서 구조화:

pip install azure-ai-documentintelligence

from azure.ai.documentintelligence import DocumentIntelligenceClient
from azure.core.credentials import AzureKeyCredential

client = DocumentIntelligenceClient(
    endpoint="https://your-resource.cognitiveservices.azure.com/",
    credential=AzureKeyCredential("your-key")
)

# 범용 OCR
with open("document.pdf", "rb") as f:
    poller = client.begin_analyze_document("prebuilt-read", body=f)
    result = poller.result()

for page in result.pages:
    for line in page.lines:
        print(line.content)

# 영수증 전용 모델
poller = client.begin_analyze_document("prebuilt-receipt", body=f)
# → 가게명, 날짜, 금액, 품목이 구조화되어 나옴

# 계약서 전용 모델
poller = client.begin_analyze_document("prebuilt-contract", body=f)
# → 당사자, 관할권, 계약 ID, 품목이 구조화되어 나옴

Azure의 강점: prebuilt-receipt, prebuilt-contract, prebuilt-invoice, prebuilt-idDocument문서 타입별 전용 모델이 있다.

3. AWS Textract — 표 추출 강함:

pip install boto3

import boto3

client = boto3.client("textract", region_name="ap-northeast-1")

with open("document.png", "rb") as f:
    response = client.detect_document_text(Document={"Bytes": f.read()})

for block in response["Blocks"]:
    if block["BlockType"] == "LINE":
        print(block["Text"])

# 표 추출
response = client.analyze_document(
    Document={"Bytes": open("table.png", "rb").read()},
    FeatureTypes=["TABLES"]
)
# → 표의 행·열 구조가 그대로 나옴

4. Naver Clova OCR — 한국어 최강:

import requests
import json

api_url = "https://your-clova-ocr-endpoint/custom/v1/your-id/general"
secret_key = "your-secret-key"

with open("document.png", "rb") as f:
    files = {"file": f}
    headers = {"X-OCR-SECRET": secret_key}
    payload = {"message": json.dumps({"version": "V2", "requestId": "test",
               "timestamp": 0, "images": [{"format": "png", "name": "doc"}]})}
    response = requests.post(api_url, headers=headers, data=payload, files=files)

result = response.json()
for field in result["images"][0]["fields"]:
    print(field["inferText"])

5. OCR Space — 무료 티어 최대:

import requests

result = requests.post(
    "https://api.ocr.space/parse/image",
    files={"file": open("document.png", "rb")},
    data={"apikey": "helloworld", "language": "kor"}  # 테스트 키
).json()

print(result["ParsedResults"][0]["ParsedText"])

가입 없이 apikey=helloworld로 테스트 가능. 25,000건/월 무료.

6. Eden AI — 여러 API 한번에 비교:

import requests

result = requests.post(
    "https://api.edenai.run/v2/ocr/ocr",
    headers={"Authorization": "Bearer your-token"},
    files={"file": open("doc.png", "rb")},
    data={"providers": "google,amazon,microsoft", "language": "ja"}
).json()

# Google, AWS, Azure 결과를 한번에 비교!
for provider, data in result.items():
    if provider != "eden-ai":
        print(f"--- {provider} ---")
        print(data["text"][:100])

Eden AI는 API 허브 — 한 번의 호출로 여러 제공사의 결과를 받아 비교할 수 있다.

가격 비교 (1,000페이지 기준)

서비스 1,000페이지 가격 무료 티어 비고
Google Vision ~$1.50 1,000건/월 가장 저렴
Azure Document Intelligence ~$1.50 (Read) / ~$10 (특화 모델) 500페이지/월 특화 모델은 비쌈
AWS Textract ~$1.50 (텍스트) / ~$15 (표) 1,000페이지/3개월 표 추출이 비쌈
Clova OCR 건별 과금 무료 티어 있음 한국어 특화
Mathpix ~$10 20페이지/월 수식 전용이라 비쌈
OCR Space 무료 25,000건/월 정확도는 클라우드 대비 낮음

선택 가이드

상황 추천
정확도 최우선 Google Cloud Vision
영수증·계약서 구조화 Azure Document Intelligence (전용 모델)
표 추출 AWS Textract
한국어 Clova OCR
수식·논문 Mathpix
무료로 많이 OCR Space (25K/월)
여러 API 비교 Eden AI
AWS 이미 쓰는 중 Textract (인프라 통합 편함)

핵심 개념

1

Google Cloud Vision — 정확도 최고. pip install google-cloud-vision + 3줄

2

Azure Document Intelligence — 영수증·계약서 전용 모델. prebuilt-receipt/contract

3

AWS Textract — 표 구조화 추출 강함. FeatureTypes=[\"TABLES\"]

4

Clova OCR — 한국어 최강. Naver Cloud Platform에서 발급

5

Eden AI — 한 번의 호출로 Google/AWS/Azure 결과를 동시에 비교

사용 사례

프로토타입 — 모델 설치 없이 API만으로 빠르게 OCR 기능 구현 영수증/계약서 자동화 — Azure의 전용 모델로 구조화된 데이터 추출 다중 제공사 비교 — Eden AI로 같은 이미지를 여러 API에 동시에 돌려 비교