VOOZH about

URL: https://apify.com/latexconvert/image-to-latex-api

โ‡ฑ LatexConvert Image to LaTeX API ยท Apify


Pricing

from $1.50 / 1,000 results

Go to Apify Store

LatexConvert Image to LaTeX API

Convert formula images, screenshots, and equation URLs into clean LaTeX with the LatexConvert API. Provided by latexconvert.com

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ latexconvert

latexconvert

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 months ago

Last modified

Share

Convert formula image URLs and uploaded image files into LaTeX with LatexConvert. This Actor is a paid proxy for the LatexConvert API and writes one result row per input image to the default Dataset.

Input

{
"imageUrls":[
"https://example.com/formula.png"
],
"uploadedImages":[]
}
  • imageUrls: Public HTTP or HTTPS image URLs.
  • uploadedImages: Image files uploaded in the Apify Console.

Provide at least one image URL or uploaded image. You can use both input methods in the same run.

API usage

Set these environment variables before running the examples:

exportAPIFY_TOKEN="YOUR_APIFY_TOKEN"
exportACTOR_ID="RuUmfScEITpPXeUU0"

Image URL with curl

curl-sS-X POST "https://api.apify.com/v2/acts/$ACTOR_ID/run-sync-get-dataset-items"\
-H"Authorization: Bearer $APIFY_TOKEN"\
-H"Content-Type: application/json"\
-d'{"imageUrls":["https://example.com/formula.png"]}'

Image URL with Python

Install the dependency:

$python3 -m pip install requests
import json
import os
import requests
APIFY_TOKEN = os.environ["APIFY_TOKEN"]
ACTOR_ID = os.environ.get("ACTOR_ID","RuUmfScEITpPXeUU0")
url =f"https://api.apify.com/v2/acts/{ACTOR_ID}/run-sync-get-dataset-items"
payload ={
"imageUrls":["https://example.com/formula.png"],
}
response = requests.post(
url,
headers={
"Authorization":f"Bearer {APIFY_TOKEN}",
"Content-Type":"application/json",
},
json=payload,
timeout=360,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))

Local file with curl

This example uploads a local image into an Apify key-value store, then passes the uploaded record URL to the Actor. It requires jq.

exportIMAGE_FILE="img/taileformula.png"
exportRECORD_KEY="image-$(date +%s)-$(basename"$IMAGE_FILE")"
exportCONTENT_TYPE="$(file--brief --mime-type "$IMAGE_FILE")"
exportSTORE_ID="$(curl-sS-X POST "https://api.apify.com/v2/key-value-stores"\
-H"Authorization: Bearer $APIFY_TOKEN"\
-H"Content-Type: application/json"\
| jq -r'.data.id')"
curl-sS-X PUT "https://api.apify.com/v2/key-value-stores/$STORE_ID/records/$RECORD_KEY"\
-H"Authorization: Bearer $APIFY_TOKEN"\
-H"Content-Type: $CONTENT_TYPE"\
--data-binary "@$IMAGE_FILE"
exportFILE_URL="https://api.apify.com/v2/key-value-stores/$STORE_ID/records/$RECORD_KEY?token=$APIFY_TOKEN"
curl-sS-X POST "https://api.apify.com/v2/acts/$ACTOR_ID/run-sync-get-dataset-items"\
-H"Authorization: Bearer $APIFY_TOKEN"\
-H"Content-Type: application/json"\
-d"{\"uploadedImages\":[\"$FILE_URL\"]}"

Local file with Python

import json
import mimetypes
import os
import pathlib
import time
import requests
APIFY_TOKEN = os.environ["APIFY_TOKEN"]
ACTOR_ID = os.environ.get("ACTOR_ID","RuUmfScEITpPXeUU0")
IMAGE_FILE = pathlib.Path(os.environ.get("IMAGE_FILE","img/taileformula.png"))
APIFY_API_BASE ="https://api.apify.com/v2"
headers ={
"Authorization":f"Bearer {APIFY_TOKEN}",
}
store_response = requests.post(
f"{APIFY_API_BASE}/key-value-stores",
headers={**headers,"Content-Type":"application/json"},
timeout=60,
)
store_response.raise_for_status()
store_id = store_response.json()["data"]["id"]
record_key =f"image-{int(time.time())}-{IMAGE_FILE.name}"
content_type = mimetypes.guess_type(IMAGE_FILE.name)[0]or"application/octet-stream"
record_url =f"{APIFY_API_BASE}/key-value-stores/{store_id}/records/{record_key}"
upload_response = requests.put(
record_url,
headers={**headers,"Content-Type": content_type},
data=IMAGE_FILE.read_bytes(),
timeout=120,
)
upload_response.raise_for_status()
uploaded_image_url =f"{record_url}?token={APIFY_TOKEN}"
run_url =f"{APIFY_API_BASE}/acts/{ACTOR_ID}/run-sync-get-dataset-items"
run_response = requests.post(
run_url,
headers={**headers,"Content-Type":"application/json"},
json={"uploadedImages":[uploaded_image_url]},
timeout=360,
)
run_response.raise_for_status()
print(json.dumps(run_response.json(), indent=2, ensure_ascii=False))

In the Apify Console, use the Uploaded images field to upload files directly instead of creating the key-value store yourself.

Output

Each image produces one Dataset item:

{
"index":0,
"inputType":"imageUrl",
"imageUrl":"https://example.com/formula.png",
"uploadedImage":null,
"success":true,
"latex":"E = mc^2",
"errorCode":null,
"error":null,
"mimeType":"image/png",
"processingTimeMs":1350,
"requestId":"run-id-0"
}

If no formula is found, the Actor returns a structured error row instead of failing the whole run:

{
"index":0,
"inputType":"imageUrl",
"imageUrl":"https://example.com/photo.jpg",
"uploadedImage":null,
"success":false,
"latex":null,
"errorCode":"NO_FORMULAS_FOUND",
"error":"No mathematical formulas found in the image.",
"mimeType":null,
"processingTimeMs":1200,
"requestId":"run-id-0"
}

Pricing

The Actor charges one image-conversion-attempt event for each valid image URL or accepted uploaded-image reference before it is sent to the conversion API. Each event costs $0.0015, so a run with N chargeable image inputs costs N * $0.0015, plus any standard Apify platform usage costs. The charge applies even if no formula is found, because the image still has to be analyzed by the conversion engine.

Invalid image URL input, such as a non-HTTP URL, is rejected before charging. Uploaded images are charged once the file reference is accepted for processing.

Set ALLOW_UNCHARGED_RUNS=true only for private testing before Pay per event pricing is enabled. Set ALLOW_UNCHARGED_RUNS=false for public monetized runs so each valid image attempt is charged through Apify.

Limits

  • Maximum 10 image URLs per run.
  • Maximum 10 uploaded images per run.
  • Maximum uploaded image size is 10 MB.
  • Images are processed one at a time to keep conversion reliability stable.
  • Supported image formats are JPEG, PNG, GIF, and WebP.
  • The conversion API may reject oversized images, private network URLs, unsupported formats, or slow image downloads.

Accuracy

Results depend on image quality. Clear printed equations usually work best. Low-resolution screenshots, cropped formulas, handwritten math, unusual notation, or heavy visual noise can reduce accuracy.

You might also like

Image to Markdown

abotapi/any-doc-parser

Image to Markdown converts images and scanned PDFs into structured Markdown using AI-powered document understanding. It recognizes text, tables, mathematical formulas (LaTeX), and figures while preserving the correct reading order and document layout.

PDF to Markdown Converter - AI-Powered with OCR & Tables

clearpath/pdf-to-markdown-api

Convert PDFs to clean Markdown with GPU-accelerated AI. Extracts tables, LaTeX formulas, and images from complex layouts. Supports OCR for scanned docs in 8 languages. Batch process hundreds of PDFs in parallel via URL, upload, or API.

Pandoc Universal Mcp

whitewalk/pandoc-universal-mcp

Convert documents between 40+ formats via MCP. Markdown, DOCX, PDF, HTML, LaTeX, EPUB, PPTX & more. Academic support with citations, bibliography & math. Batch conversion. Perfect for AI agents & Claude Desktop integration.

DLMF NIST Math Functions Scraper

jungle_synthesizer/dlmf-nist-math-functions-scraper

Scrapes the NIST Digital Library of Mathematical Functions (DLMF) for structured equation data: MathML, LaTeX source, constraints, and referenced functions โ€” across all 36 chapters and hundreds of sections.

๐Ÿ‘ User avatar

BowTiedRaccoon

2

Pandoc Document Converter

gentle_cloud/pandoc-document-converter

Convert documents between formats (HTML, Markdown, DOCX, EPUB, PDF, LaTeX, RST, ODT, PPTX) using Pandoc. Accepts raw text or URL input.

16

URL Screenshot Generator

room_js/url-screenshot-generator

Generate screenshots for provided list of URLs and crop them on the go!

๐Ÿ‘ User avatar

JavaScript Room

47

5.0

Google Images Scraper

hooli/google-images-scraper

Scrape image details from images.google.com. Add your query and number of images and extract image details such as image URL, image source, description, image dimensions, thumbnail, and more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

Convert Image to PDF and PDF to Image

akash9078/image-pdf-converter

Convert images (JPG, PNG, BMP, and more) into high-quality PDFs, or extract images from PDF files in seconds. Imageโ€“PDF Converter Pro delivers fast, reliable, and professional results for all your document and image conversion needs.

๐Ÿ‘ User avatar

Akash Kumar Naik

37

Related articles

Top 5 Google Image Search APIs to extract web image data
Read more
How to bulk download all images from a URL list
Read more
How to scrape Google Images in 4 steps
Read more