Firehose stream of all tweets
x.x.stream-posts-firehoseStream all Posts
- Price
- $0.005/resultPelo preço do provedor
- Success rate
- —Ainda não há dados da taxa de sucessoLast 30 days · 0 calls
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/x.x.stream-posts-firehosePreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de consulta | ||||
end_time | string | Opcional | YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. | |
partition | inteiro | Obrigatório | The partition number. | |
expansions | matriz | Opcional | A comma separated list of fields to expand. | |
start_time | string | Opcional | YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. | |
poll.fields | matriz | Opcional | A comma separated list of Poll fields to display. | |
user.fields | matriz | Opcional | A comma separated list of User fields to display. | |
media.fields | matriz | Opcional | A comma separated list of Media fields to display. | |
place.fields | matriz | Opcional | A comma separated list of Place fields to display. | |
tweet.fields | matriz | Opcional | A comma separated list of Tweet fields to display. | |
backfill_minutes | inteiro | Opcional | The number of minutes of backfill requested. | |
- Parâmetros de consulta
end_timestringOpcionalYYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
partitioninteiroObrigatórioThe partition number.
expansionsmatrizOpcionalA comma separated list of fields to expand.
start_timestringOpcionalYYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
poll.fieldsmatrizOpcionalA comma separated list of Poll fields to display.
user.fieldsmatrizOpcionalA comma separated list of User fields to display.
media.fieldsmatrizOpcionalA comma separated list of Media fields to display.
place.fieldsmatrizOpcionalA comma separated list of Place fields to display.
tweet.fieldsmatrizOpcionalA comma separated list of Tweet fields to display.
backfill_minutesinteiroOpcionalThe number of minutes of backfill requested.
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
curl -X GET 'https://toolswitch.dev/v1/tools/x.x.stream-posts-firehose' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/x.x.stream-posts-firehose",
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-firehose", {
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());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a $0.005/result, incluindo a taxa de serviço.