Schedule Tweet Search, Timelines & X Data Workflows with Prefect
Run Xquik reads in Prefect 3 flows. Use reusable credentials, async tasks, and Prefect retries.
Choose this integration for scheduled ingestion and downstream Prefect tasks.
Available Tasks
| Customer question | Prefect task | Xquik endpoint |
|---|---|---|
| How can I schedule tweet searches? | search_tweets |
GET /x/tweets/search |
| How can I retrieve one post? | get_tweet |
GET /x/tweets/{id} |
| How can I search public users? | search_users |
GET /x/users/search |
| How can I enrich records with profiles? | get_user |
GET /x/users/{id} |
| How can I snapshot a profile timeline? | get_user_tweets |
GET /x/users/{id}/tweets |
| How can I watch regional trends? | get_trends |
GET /x/trends |
This package exposes 6 read-only tasks. Use the REST API for follower exports or writes.
Install
pip install prefect-xquik
Register Blocks
prefect block register -m prefect_xquik
Create a block in the Prefect UI or with Python:
from prefect_xquik import XquikCredentials
credentials = XquikCredentials(api_key="your_xquik_api_key_here")
credentials.save("xquik", overwrite=True)
Store API keys in Prefect blocks, not in flow source files.
Create a Flow
from prefect import flow
from prefect_xquik import XquikCredentials, get_trends, search_tweets
@flow
async def social_signal_flow() -> dict:
credentials = XquikCredentials.load("xquik")
tweets = await search_tweets(
credentials,
query='"prefect" OR "workflow orchestration"',
query_type="Latest",
limit=25,
)
trends = await get_trends(credentials, woeid=1, count=10)
return {"tweets": tweets, "trends": trends}
Import Tasks
from prefect_xquik import (
get_trends,
get_tweet,
get_user,
get_user_tweets,
search_tweets,
search_users,
)
Tasks return the raw Xquik JSON response as a Python dictionary. Configure
Prefect runtime behavior with with_options:
from prefect_xquik import search_tweets
search_recent_tweets = search_tweets.with_options(
name="Search Recent X Posts",
retries=2,
retry_delay_seconds=10,
)
API Contract
The credentials block sends x-api-key and xquik-api-contract: 2026-04-29.
Documentation
- Xquik Prefect guide
- Xquik API reference
- Prefect integrations guide
- Prefect workflows and tasks
- Organization support policy
- Security policy
- Contributing
Development
uv sync
uv run ruff format --check .
uv run ruff check .
uv run pip-audit
uv run pytest
./scripts/build_reproducibly.sh
uv run twine check dist/*
uv run pytest enforces 100% statement, branch, function, and line coverage.
CI also verifies REUSE 3.3 licensing and dependency audits.
CI builds every distribution twice and compares each byte.
Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.
Release files for prefect-xquik 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prefect_xquik-0.1.9.tar.gz | 219.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prefect_xquik-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 231.8 kB
Release files / prefect_xquik-0.1.9.tar.gz
| Download URL | prefect_xquik-0.1.9.tar.gz |
|---|---|
| Size | 219.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9edddb5bd3a62a5ce8d5023bf68ae4aae557db2ffc6b4b2fe7f4b3678d5ce18
|
|
BLAKE2b-256 checksum How to use checksums |
76883b88f6b9ff99583a4086eb17fc707a531702dcd7c52bb297151ca440966c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / prefect_xquik-0.1.9-py3-none-any.whl
| Download URL | prefect_xquik-0.1.9-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
267d257076ce40b372c6b1e837f5093256d6dd24cb4b1808236725745496322d
|
|
BLAKE2b-256 checksum How to use checksums |
dc0c6f136fc669e809203d89f1a7952ae0d8a19fe3a5e2923f66b46185460d7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency log