AnyConvert
← All docs

DWG to Text

Send a DWG or DXF file, get back every text entity's exact string and position as JSON — read from the drawing's own TEXT, MTEXT, attribute, dimension, leader, and table entities, not recognized from pixels.

See the DWG to Text tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.

Request

POST /webhooks/trigger — same endpoint and fields as every tool, with tool="dwg-to-text" set explicitly (it's not the default).

curl
curl -X POST https://api.anyconvert.app/webhooks/trigger \
  -H "x-api-key: your_api_key_here" \
  -F "file=@site-plan.dwg" \
  -F "fileId=drawing-001" \
  -F "referenceId=reference-001" \
  -F "tool=dwg-to-text"

Options

An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged — a bad value is rejected with 400, not charged and not queued. Every item carries a conf of 1.0 and a source of dwg-entity — this is exact text, not OCR.

layoutsstring, optionalDefault "model". "model", "all", or a list of paper-space layout names.
granularitystring, optionalDefault "entity" — one item per text entity (multi-line text split into lines), or "word" to also split each line into words.
includeHiddenboolean, optionalDefault true — include invisible attributes and text on frozen or off layers, flagged rather than removed.
includeDefinitionsboolean, optionalDefault false — include block-definition template text that isn't placed in any layout.
includeRawboolean, optionalDefault false — keep the undecoded string alongside the decoded one.
coordinateSpacestring, optionalDefault "page" (aligned with the DWG to PDF output), "world" (drawing units only), or "both".
unitsstring, optional"drawing" (default) or "mm" for world coordinates.

Response

The webhook delivers a .json file (not a DWG): every text item's string, position in drawing and page coordinates, source entity (type, layer, block path), and flags (hidden, mirrored, computed, and similar). A per-layout diagnostics block lists entity counts and anything skipped.

Pricing

Billed per page, not per document — 1 credit for every 5 pages, rounded up. This sits at the same rate as PDF OCR, reflecting the entity-walking and coordinate-transform work behind every page rather than a simple page count.

Failure reasons

Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.

invalid_optionsA bad or unknown option, or an unknown layout name.
dwg_conversion_failedThe DWG reader itself failed on the file.
empty_modelspaceThe drawing has no entities at all in the selected layouts.
no_extractable_textThe drawing has entities, but none carry any text.
invalid_fileThe file could not be read, or was not the format this tool expects.
render_failedSomething failed during conversion that wasn’t a problem with the input itself.
timeoutThe job did not finish within its time budget.
internal_errorAn unexpected error on our side.
AnyConvert
A simple conversion API for teams that need documents turned into the right format, automatically.
Tools
PDF to WordMerge PDFJPG to PDFSign PDFEdit PDFCompress PDFExtract Text with CoordinatesView all tools →
Product
DocsPricing
Legal
Terms of ServicePrivacy PolicyRefund Policy
Support
support@anyconvert.app
© 2026 AnyConvert. All rights reserved.