Stream sampled tweets in real time
x.x.stream-posts-sampleStream sampled Posts
- Price
- $0.005/resultAt provider cost
- Success rate
- —No success-rate data yetLast 30 days · 0 calls
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/x.x.stream-posts-samplePreviewTry onlineComing soonProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
expansions | array | Optional | A comma separated list of fields to expand. | |
poll.fields | array | Optional | A comma separated list of Poll fields to display. | |
user.fields | array | Optional | A comma separated list of User fields to display. | |
media.fields | array | Optional | A comma separated list of Media fields to display. | |
place.fields | array | Optional | A comma separated list of Place fields to display. | |
tweet.fields | array | Optional | A comma separated list of Tweet fields to display. | |
backfill_minutes | integer | Optional | The number of minutes of backfill requested. | |
- Query parameters
expansionsarrayOptionalA comma separated list of fields to expand.
poll.fieldsarrayOptionalA comma separated list of Poll fields to display.
user.fieldsarrayOptionalA comma separated list of User fields to display.
media.fieldsarrayOptionalA comma separated list of Media fields to display.
place.fieldsarrayOptionalA comma separated list of Place fields to display.
tweet.fieldsarrayOptionalA comma separated list of Tweet fields to display.
backfill_minutesintegerOptionalThe number of minutes of backfill requested.
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/x.x.stream-posts-sample' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/x.x.stream-posts-sample",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/x.x.stream-posts-sample", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.005/result, including the service fee.