Word
Extract text from Word document
Extract all text content from a Microsoft Word document.
Extracts text from:
- Document body
- Headers and footers
- Tables
- Text boxes
Example Usage
import httpx
with open("report.docx", "rb") as f:
response = httpx.post(
"https://api.filegraph.ai/docx/to-text",
headers={"X-API-Key": "your-api-key"},
files={"file": f},
)
print(response.json()["text"])
post/docx/to-text
Request
- Base URL: https://api.filegraph.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.filegraph.ai/docx/to-text
- Auth: API key in header X-API-Key
Response
Successful Response
Example response
{
"char_count": 892,
"format_detected": "pdf",
"metadata": {
"page_count": 3
},
"text": "This is the extracted text from the document...",
"used_ocr": false,
"word_count": 150
}Changes
No recorded changes to this operation across all 1 revision of this API.