Formats and fields
JSON by default, CSV for lists, plain text for transcripts, and a fields parameter that trims any response.
format
format | Works on | Returns |
|---|---|---|
json (default) | everything | The { data, meta?, request_id } envelope |
csv | list endpoints | Flattened rows, one item per line, UTF-8 |
text | transcript endpoints | The plain transcript, no envelope |
curl "https://api.instadata.dev/v1/instagram/comments?url=…&limit=50&format=csv" \
-H "Authorization: Bearer ik_live_..." -o comments.csv
Nested objects flatten with underscores (author.handle becomes author_handle). Credits are identical across formats.
fields
Pass a comma-separated list of paths to keep only those keys:
curl "https://api.instadata.dev/v1/instagram/channel-stats?handle=nasa&fields=handle,followers,bio" \
-H "Authorization: Bearer ik_live_..."
- Dot notation reaches nested keys:
author.handle. - On lists the projection applies to every item.
- Unknown fields are ignored, so projections survive schema additions.
request_idandmetaare always included.- Credits are unchanged; projection saves bandwidth and tokens, not billing.