{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "somarkai-oxr--convert-pdfs-to-markdown-and-json-via-cli",
 "repo": "SoMarkAI/OXR",
 "repo_url": "https://github.com/SoMarkAI/OXR",
 "repo_slug": "somarkai-oxr",
 "title": "Convert PDFs to Markdown and JSON from the command line",
 "page_title": "How to convert PDFs to Markdown and JSON from the command line with OXR",
 "summary": "Use the SoMark CLI with the free OXR endpoint to batch-convert documents to Markdown and JSON.",
 "who": "A developer building a document ingestion step who needs Markdown and JSON with layout data from PDFs.",
 "problem": "Raw PDF text loses tables, formulas, and reading order, which makes downstream processing unreliable.",
 "outcome": "Each PDF produces a Markdown file and a JSON file with layout coordinates in an output folder.",
 "steps": [
  "`pip install somark`",
  "`somark --base-url https://free-oxr.somark.ai/api/v1 --api-key dummy parse document.pdf --formats md,json --out ./parsed-output/` (inferred, check the README)",
  "Repeat the parse command for each file you need to convert. (inferred, check the README)",
  "Open the files in ./parsed-output/ and check the Markdown and JSON content."
 ],
 "agent_prompt": "Using the OXR repo at https://github.com/SoMarkAI/OXR, install the somark CLI and parse <path-to-document.pdf> with the base URL https://free-oxr.somark.ai/api/v1, outputting md and json to ./parsed-output/. Verify that both output files exist and that the JSON includes layout coordinates.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The README says the free API uses a queue, so processing speed may vary, and it is not recommended for production.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "A PDF or document image to parse",
  "Python 3.12 or Node.js for the SoMark CLI, or Docker for a local service",
  "For local hosting: Linux, an NVIDIA GPU with BF16 support, and 24GB or more of GPU memory"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/somarkai-oxr/convert-pdfs-to-markdown-and-json-via-cli/",
 "md": "https://dedupedai.com/use-cases/somarkai-oxr/convert-pdfs-to-markdown-and-json-via-cli/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/somarkai-oxr--convert-pdfs-to-markdown-and-json-via-cli.json",
 "api_version": "v1"
}
