Skip to main content
POST
/
v1
/
upload
Python
import requests

url = "https://api.parser.expert/v1/upload"

headers = {
    'X-API-Key': 'sk-xxxx'
}

files = {
    'file': open('/path/to/your/file.pdf', 'rb'),
    'bucket_id': (None, '100202')
}

response = requests.post(url, headers=headers, files=files)

print(response.text)
{
  "data": {
    "parser_id": "f555c13a-846f-4505-95fe-8f72b39edef9"
  },
  "message": "Extract upserted successfully"
}

Authorizations

X-API-Key
string
header
required

Body

multipart/form-data
bucket_id
string
required

The ID of the bucket where the data will be stored.Refer to Quickstart for set extraction fields

file
file

The file to upload. Supported formats are PDF, DOCX, Image, Txt File (maximum of 10 pages per document).

webpage_url
string

The URL of the webpage to extract content from. This will be ignored if file is provided.

Response

Extract upserted successfully

data
object
message
string

Success message.

I