Skip to content

Field projection

Pass fields with a comma-separated list of paths to receive only those keys:

Terminal window
curl "https://api.scrapersocial.com/v1/tiktok/stats?url=...&fields=metrics.views,metrics.likes,posted_at" \
-H "Authorization: Bearer sk_live_..."
{
"data": {
"posted_at": "2026-06-30T14:05:00Z",
"metrics": { "views": 1204593, "likes": 88410 }
},
"request_id": "req_01JZX4M8Q2TE9W"
}

Rules

  • Dot notation addresses nested keys: author.handle, metrics.views.
  • On list endpoints the projection applies to every item in data.
  • Unknown fields are ignored silently (no error) so projections survive schema additions.
  • request_id and meta are always included.
  • Credits are unchanged — projection saves bandwidth and tokens, not billing.

Why bother?

LLM pipelines: a full stats payload is ~40 lines; a projected one is 5. Across a thousand items in a context window, that’s the difference between fitting and truncating:

r = httpx.get(f"{BASE}/v1/instagram/channel-posts",
params={"handle": "instagram", "limit": 50,
"fields": "caption,metrics.likes,posted_at"},
headers=H)

Next: Output formats · Caching & freshness