Is the Twitter API public? Accounts, keys and data access
Public Twitter data still needs API credentials. See which key or account token you need for official X reads, TweetAPI reads, and own-account analytics.
You can request public Twitter posts and profiles through an API, but you need credentials. The official X API and TweetAPI use different keys. Choose the one that matches your task:
| Task | Credentials to prepare | What the credential authorizes |
|---|---|---|
| Read public data with the official X API | X developer account, app, and appropriate app token | Calls permitted by your X app and product access |
| Read public data with TweetAPI | TweetAPI account and X-API-Key | TweetAPI's documented public-read endpoints; no separate X developer app |
| Read your own account analytics with TweetAPI | TweetAPI key and that account's authToken | user-analytics for the account identified by the token |
| Perform an account-authorized action | API key plus the specific endpoint's required account credentials | Only the operation and account permitted by that endpoint |
The official X access guide covers developer signup and app credentials. Its authentication guide explains app-only and user-context access. For TweetAPI, check the endpoint's parameters before supplying an account token. Use a token only for an account you are authorized to access.
Last checked September 25, 2026. TweetAPI is a third-party service. Not affiliated with X Corp.
A public read with one key
After setting TWEETAPI_KEY in your shell, look up a public profile. Replace the sample username with an existing public username:
curl --get "https://api.tweetapi.com/tw-v2/user/by-username" \
--data-urlencode "username=sample_user_00001" \
-H "X-API-Key: $TWEETAPI_KEY" \
--max-time 30 --fail-with-body
The profile endpoint returns public account fields under data. You do not need the viewed account's authToken. Your TweetAPI key identifies you for access, metering, and rate limits. The quickstart covers key creation; the free-access guide explains the trial.
What "public" can mean
- Public data is what an endpoint can return about a public post or account. Availability varies by endpoint and at the time of the request; protected or deleted content is not made public by calling an API.
- Public documentation lets you read the API contract. Calling the API still requires the right credentials.
- Free usage depends on the provider. TweetAPI has a one-time trial; official X self-service access currently uses prepaid, pay-per-use billing.
- OpenAPI is a machine-readable description of endpoints. TweetAPI publishes an OpenAPI specification, but the file does not grant access or make the service open source.
Public-post counters give you a current snapshot. The analytics report guide shows how to export them and explains the separate route for your own account analytics. Posting, engagement, and messaging require the account credentials specified by each endpoint.
If you are still choosing between an API, your own account archive, and a licensed dataset, see the access-method comparison.
Create a TweetAPI account to make a key and test a documented public read.