Download a raw file
Records from Intelligence Search and Identity Portal have asystem_id. Pass it to the System ID module to get the file. Each download is a search and uses 1 request.
system_id: null, it has no downloadable file.
Storage ID works the same way with a storage_id and a bucket; its response has storage_id and bucket instead of system_id. See Modules and inputs.
Large files
- At most the first 8 MB of a file are delivered.
file.truncatedis thentrueandbytesis the size delivered. total_bytesis the size of the whole file, ornullif the file was over 16 MB and could not be measured.- A file known to be over 16 MB before it is read is refused with
502 upstream_error, refunded. - A file that is empty (or only whitespace) returns
file: null. It is billed, except when the file was not found, which is refunded. Checkbilled.
?format=txt
Add ?format=txt to get plain text instead of JSON. It is the same call and the same price: nothing extra is billed.
A text response is a
text/plain; charset=utf-8 attachment. The billing and quota headers are the same as for JSON, since there is no body to carry billed:
- Phonebook
- System ID / Storage ID
A-Z a-z 0-9 . _ -, so curl -OJ is safe to use.
Empty results
With?format=txt, an empty result returns 204 No Content with no body. Read X-Request-Billed to know whether it was billed.
Errors stay JSON
?format=txt only changes successful output. Errors are always the JSON envelope described in Errors. Check the status code before saving the body to a file: