data.body is text for a model, and data.metadata holds the structured fields for code.
Here is the result for the paper “Attention Is All You Need” from the arxiv source, with the body shortened:
The envelope
Every response has these top-level fields.The result
data has the same fields for every source. Only the contents of metadata change. These are the fields worth knowing about:
The full schema, including
id, title, source, and language, is on Search a data source.
Stale results
When a source is unavailable and Dataville has a stored copy of the record, the response is stillsuccess and carries a stale object inside data:
stale and retry later.
Usage
With an API key,usage reports what the request cost and your remaining credit. See Plans and credits. Without a key, it reports how much of the anonymous allowance is left. See Usage limits.
The same numbers are in the response headers, so you can read them without parsing the body.
Errors
Errors use the same envelope withstatus set to error. data.error is a message you can show to a user, and data.code is a stable string to branch on. See Troubleshooting.