# OCR Web Service

OCR Web Service provides SOAP and REST APIs for integrating Optical Character Recognition (OCR) technology into software products, mobile devices, or other web services.

- **Category:** ai document extraction
- **Auth:** BASIC
- **Composio Managed App Available?** N/A
- **Tools:** 4
- **Triggers:** 0
- **Slug:** `OCR_WEB_SERVICE`
- **Version:** 20260316_00

## Tools

### Get Account Credentials

**Slug:** `OCR_WEB_SERVICE_GET_ACCOUNT_CREDENTIALS`

Tool to extract OCRWebService credentials (user_name, license_code) from connection metadata. Always call this before invoking OCR_WEB_SERVICE_RECOGNIZE or OCR_WEB_SERVICE_GET_ACCOUNT_INFORMATION rather than reusing cached values, as credentials may become stale. Use OCR_WEB_SERVICE_GET_ACCOUNT_INFORMATION to verify account status and quota before submitting large jobs.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Account Information

**Slug:** `OCR_WEB_SERVICE_GET_ACCOUNT_INFORMATION`

Retrieve OCRWebService account information including remaining pages, subscription plan, and expiration date. Use this tool to check your account status before large OCR jobs — exhausted page quotas will cause OCR_WEB_SERVICE_RECOGNIZE to fail mid-run. Returns details about your subscription including pages remaining and plan expiration. If credentials are invalid or stale, retrieve fresh user_name and license_code via OCR_WEB_SERVICE_GET_ACCOUNT_CREDENTIALS before retrying. Requires valid OCRWebService credentials (username and license code).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user_name` | string | Yes | OCRWebService account username for authentication |
| `license_code` | string | Yes | OCRWebService account license code (API key) for authentication |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### OCR Web Service Log

**Slug:** `OCR_WEB_SERVICE_LOG`

Tool to retrieve OCR processing logs for a date range on your account. Invalid credentials or bad date ranges return empty data rather than an error, so an empty result may indicate incorrect inputs rather than no logs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to_date` | string | Yes | End date for log (YYYY-MM-DD) |
| `reserved` | array | No | Reserved values, if any |
| `from_date` | string | Yes | Start date for log (YYYY-MM-DD) |
| `user_name` | string | Yes | Account user name |
| `license_code` | string | Yes | Account license code |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### OCRWebService Recognize

**Slug:** `OCR_WEB_SERVICE_RECOGNIZE`

Tool to call SOAP Recognize operation. Use when performing OCR on an image to retrieve text, output document, word coordinates, and errors. Consumes page quota per call; returns HTTP 429 when limits exceeded. Check quota via OCR_WEB_SERVICE_GET_ACCOUNT_INFORMATION before large jobs; batch large PDFs in ~25–50 page chunks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user_name` | string | Yes | OCRWebService account username |
| `OCRWSSetting` | object | Yes | OCR processing settings (languages, output, options) |
| `license_code` | string | Yes | OCRWebService account license code |
| `OCRWSInputImage` | object | Yes | Input file container (name + data) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
