---
title: "Extract text from a file URL"
method: POST
path: "/api/data/{project_id}/extract-from-url"
tags: ["Data"]
---

# Extract text from a file URL

`POST /api/data/{project_id}/extract-from-url`

## Request

- Base URL: `https://core.blink.new`
- URL: `https://core.blink.new/api/data/{project_id}/extract-from-url`
- Auth: HTTP bearer

Download a file from a public URL and extract its text content. Supports PDF, DOCX, XLSX, PPTX, HTML, and plain text. Set `chunking: true` to split the output into fixed-size chunks (default 4000 chars, minimum 1000) — useful for embedding pipelines.

## Path parameters

- `project_id` string, required

## Request body

- ExtractFromUrlRequest
  - `url` string, uri, required: Public URL of the file to extract data from
  - `chunking` boolean: Whether to split text into chunks. If false, returns single text string.
  - `chunkSize` integer: Size of each chunk in characters (minimum 1000). Only used when chunking=true.

## Response `200`

Text extracted successfully

- ExtractFromUrlResponse
  - `chunks` string[]: Array of text chunks (when chunking=true)
  - `text` string: Complete extracted text as single string (when chunking=false)

## Other responses

- `400`: Invalid request — missing/invalid URL or project ID
- `401`: Authentication required or invalid API key
- `405`: Method not allowed — only POST is supported
- `413`: File too large
- `500`: Internal server error

---

[API](https://skmtc.dev/blink/apis/blink-apis.md) - [All operations](https://skmtc.dev/blink/apis/blink-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/blink/apis/blink-apis/revisions/4c59c706078e?raw)
