Files
AutoGPT/docs/integrations/block-integrations/twitter/user_lookup.md
Nicholas Tindle 90466908a8 refactor(docs): restructure platform docs for GitBook and remove MkDo… (#11825)
<!-- Clearly explain the need for these changes: -->
we met some reality when merging into the docs site but this fixes it
### Changes 🏗️
updates paths, adds some guides
<!-- Concisely describe all of the changes made in this pull request:
-->
update to match reality
### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] deploy it and validate

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Aligns block integrations documentation with GitBook.
> 
> - Changes generator default output to
`docs/integrations/block-integrations` and writes overview `README.md`
and `SUMMARY.md` at `docs/integrations/`
> - Adds GitBook frontmatter and hint syntax to overview; prefixes block
links with `block-integrations/`
> - Introduces `generate_summary_md` to build GitBook navigation
(including optional `guides/`)
> - Preserves per-block manual sections and adds optional `extras` +
file-level `additional_content`
> - Updates sync checker to validate parent `README.md` and `SUMMARY.md`
> - Rewrites `docs/integrations/README.md` with GitBook frontmatter and
updated links; adds `docs/integrations/SUMMARY.md`
> - Adds new guides: `guides/llm-providers.md`,
`guides/voice-providers.md`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fdb7ff8111. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: bobby.gaffin <bobby.gaffin@agpt.co>
2026-01-23 06:18:16 +00:00

4.2 KiB

Twitter User Lookup

Blocks for looking up Twitter/X user profiles and information.

Twitter Get User

What it is

This block retrieves information about a specified Twitter user.

How it works

This block queries the Twitter API v2 to retrieve detailed information about a single user. You can look up users either by their unique Twitter ID or by their username (handle). The block uses Tweepy with OAuth 2.0 authentication.

Optional expansions allow you to include additional data such as the user's pinned tweet. The response includes profile information like display name, bio, follower count, and profile image URL based on the user_fields selected.

Inputs

Input Description Type Required
expansions Choose what extra information you want to get with user data. Currently only 'pinned_tweet_id' is available to see a user's pinned tweet. UserExpansionsFilter No
tweet_fields Select what tweet information you want to see in pinned tweets. This only works if you select 'pinned_tweet_id' in expansions above. TweetFieldsFilter No
user_fields Select what user information you want to see, like username, bio, profile picture, etc. TweetUserFieldsFilter No
identifier Choose whether to identify the user by their unique Twitter ID or by their username Identifier Yes

Outputs

Output Description Type
error Error message if the operation failed str
id User ID str
username_ User username str
name_ User name str
data Complete user data Dict[str, Any]
included Additional data requested via expansions Dict[str, Any]

Possible use case

Profile Verification: Look up a user's profile to verify their identity or check their account details before engaging.

User Research: Gather information about a specific account for competitive analysis or influencer research.

Account Validation: Verify that a username or user ID exists and is active before performing other operations.


Twitter Get Users

What it is

This block retrieves information about multiple Twitter users.

How it works

This block queries the Twitter API v2 to retrieve detailed information about multiple users in a single request. You can look up users by their Twitter IDs or usernames (handles), making it efficient for batch operations.

The block uses Tweepy with OAuth 2.0 authentication and supports expansions for additional data like pinned tweets. Returns arrays of user IDs, usernames, display names, and complete user data objects.

Inputs

Input Description Type Required
expansions Choose what extra information you want to get with user data. Currently only 'pinned_tweet_id' is available to see a user's pinned tweet. UserExpansionsFilter No
tweet_fields Select what tweet information you want to see in pinned tweets. This only works if you select 'pinned_tweet_id' in expansions above. TweetFieldsFilter No
user_fields Select what user information you want to see, like username, bio, profile picture, etc. TweetUserFieldsFilter No
identifier Choose whether to identify users by their unique Twitter IDs or by their usernames Identifier Yes

Outputs

Output Description Type
error Error message if the operation failed str
ids User IDs List[str]
usernames_ User usernames List[str]
names_ User names List[str]
data Complete users data List[Dict[str, Any]]
included Additional data requested via expansions Dict[str, Any]

Possible use case

Batch Profile Lookup: Retrieve profile information for a list of users at once, such as all participants in a conversation.

Influencer Analysis: Gather profile data for multiple influencers in a specific niche for comparison.

Follow List Enrichment: Get detailed information about accounts in your following or followers list.