APIsGet Tweets By Username

Get Posts by Username API

Retrieves all posts from a specific username within a specified date range. This endpoint is useful for tracking interactions with particular users, monitoring engagement with specific accounts, or analyzing response patterns to certain content creators.

Endpoint Details

GET https://portfolio.tigest.club/api/v1/dashboard/post/by_username

Content-Type: application/json

Request Parameters

ParameterTypeRequiredDescriptionFormatExample
start_datestringYesBeginning of date range (inclusive)YYYY-MM-DD”2025-05-28”
end_datestringYesEnd of date range (inclusive)YYYY-MM-DD”2025-05-28”
usernamestringYesTarget username to filter posts bystring”kyna_nft”

Query Parameters

All parameters are passed as URL query parameters:

?start_date=2025-05-28&end_date=2025-05-28&username=kyna_nft

Authentication

Include your API key in the request header:

X-API-KEY: your_api_key_here

Example Requests

Single Day Query for Specific User

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_username?start_date=2025-05-28&end_date=2025-05-28&username=kyna_nft' \
--header 'X-API-KEY: your_api_key_here'

Date Range Query for Specific User

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_username?start_date=2025-05-01&end_date=2025-05-31&username=elonmusk' \
--header 'X-API-KEY: your_api_key_here'

Weekly Analysis for Content Creator

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_username?start_date=2025-05-20&end_date=2025-05-27&username=crypto_analyst' \
--header 'X-API-KEY: your_api_key_here'

Response Format

Successful Response

Status Code: 200 OK

{
  "data": [
    {
      "post_uuid": "20411609-41fd-438a-a1c7-4a1c6d54b417",
      "calendar_uuid": "11b05fb5-5376-4e2e-99bb-ef4a35652580",
      "calendar_metadata": {
        "name": "Dhruv | List Your Token on Coinstore",
        "username": "DhruvAkSharda",
        "profile_photo": "https://pbs.twimg.com/profile_images/1563232110021726209/loqllRDe_normal.jpg",
        "refresh_token": "bWxUOHIyQlhnUzN5THBzQWQxZHB4Yk1NVkt2OUZsempEaFBqSVVVTHFKeFdfOjE3NDg1Mzk5NDI4OTE6MToxOnJ0OjE",
        "twitter_user_id": "736938931"
      },
      "content": "pump wild, gonna be ramen rich by morning 😂",
      "status": "published",
      "created_at": "2025-05-28T08:01:00.232Z",
      "updated_at": "2025-05-28T08:02:19.203Z",
      "channel": "Twitter",
      "post_type": "comment",
      "scheduled_at": "2025-05-28T08:02:00.081Z",
      "post_metadata": {
        "name": "Kyna",
        "username": "kyna_nft",
        "profile_photo": "https://pbs.twimg.com/profile_images/1883477048649531392/zUC6Rxhe_normal.jpg",
        "twitter_id": "1883476869603115000",
        "verified": "true",
        "tweet_id": "1927157629765214560",
        "text": "Since no specific token or tweet contents were provided, I'll craft a general astrological market forecast:🌌 Cosmic Crypto Forecast 🌌\n\nThe stars reveal heightened volatility as Mars clashes with Uranus—expect sudden pumps..."
      },
      "post_content": {
        "user_first_name": "dhruv.csx",
        "user_last_name": "",
        "user_email": "[email protected]",
        "user_uuid": "57a73826-e573-4ec9-8997-89f8a577d801",
        "name": "Dhruv | List Your Token on Coinstore",
        "username": "DhruvAkSharda",
        "profile_photo": "https://pbs.twimg.com/profile_images/1563232110021726209/loqllRDe_normal.jpg",
        "twitter_id": "736938931",
        "verified": "",
        "tweet_id": "1927636537816326269",
        "text": "pump wild, gonna be ramen rich by morning 😂"
      }
    }
  ],
  "success": true
}

Response Structure

Root Object

FieldTypeDescription
dataarrayArray of post objects matching the username and date range
successbooleanIndicates if the request was successful

Post Object Fields

FieldTypeDescription
post_uuidstringUnique identifier for the individual post
calendar_uuidstringLinks the post to a specific content calendar
calendar_metadataobjectInformation about the calendar/account owner
contentstringThe actual post content/text that was published
statusstringPost status (published, scheduled, draft)
created_atstringISO 8601 timestamp when post was created
updated_atstringISO 8601 timestamp of last modification
channelstringSocial media platform (Twitter, LinkedIn, etc.)
post_typestringType of post (comment, thread, post, etc.)
scheduled_atstringISO 8601 timestamp when post was/will be published
post_metadataobjectInformation about the original post being replied to
post_contentobjectDetailed content information and user data

Calendar Metadata Object

FieldTypeDescription
namestringDisplay name of your account
usernamestringYour platform username/handle
profile_photostringURL to your account’s profile picture
refresh_tokenstringAuthentication token for your connected account
twitter_user_idstringYour platform-specific user identifier

Post Metadata Object

Contains information about the original post that was replied to or interacted with:

FieldTypeDescription
namestringDisplay name of the target username
usernamestringThe target username (matches query parameter)
profile_photostringProfile photo URL of the target user
twitter_idstringPlatform-specific ID of the target user
verifiedstringVerification status (“true” or “false”)
tweet_idstringID of the original tweet from target user
textstringContent of the original tweet

Post Content Object

Contains details about your published response:

FieldTypeDescription
user_first_namestringYour first name
user_last_namestringYour last name
user_emailstringYour email address
user_uuidstringYour unique user identifier
namestringYour display name
usernamestringYour username
profile_photostringYour profile photo URL
twitter_idstringYour platform-specific ID
verifiedstringYour verification status
tweet_idstringID of your published response
textstringThe content of your response

Use Cases

Engagement Analysis

Track all your interactions with a specific user or content creator:

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_username?start_date=2025-05-01&end_date=2025-05-31&username=crypto_expert' \
--header 'X-API-KEY: your_api_key_here'

Competitor Analysis

Analyze your engagement patterns with competitor accounts:

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_username?start_date=2025-05-01&end_date=2025-05-15&username=competitor_brand' \
--header 'X-API-KEY: your_api_key_here'

Filtering Logic

The API returns posts where:

  • Your account has interacted with content from the specified username
  • The interaction occurred within the specified date range
  • The post_metadata.username field matches the provided username parameter

This typically includes:

  • Comments/Replies: Your responses to posts from the target username
  • Quote Tweets: Your quoted retweets of the target user’s content
  • Thread Replies: Your responses within threads started by the target user

Error Handling

Invalid Date Format (Code: 4001)

{
  "errors": {
    "code": 4001,
    "message": "Invalid date format. Please use YYYY-MM-DD format."
  },
  "success": false
}

Solution: Ensure dates are in the correct YYYY-MM-DD format.

Missing Username Parameter (Code: 4010)

{
  "errors": {
    "code": 4010,
    "message": "Username parameter is required."
  },
  "success": false
}

Solution: Include the username parameter in your query string.

Invalid Date Range (Code: 4003)

{
  "errors": {
    "code": 4003,
    "message": "Start date must be before or equal to end date."
  },
  "success": false
}

Solution: Ensure the start_date is not after the end_date.

Authentication Error (Code: 4004)

{
  "errors": {
    "code": 4004,
    "message": "Invalid API key or insufficient permissions."
  },
  "success": false
}

Solution: Verify your API key is correct and has the necessary permissions.

No Data Found

{
  "data": [],
  "success": true
}

Note: This indicates no posts were found matching the username and date range criteria.


Best Practices

  1. Username Accuracy: Ensure the username parameter matches exactly (case-sensitive)
  2. Date Range Optimization: Use smaller date ranges for better performance
  3. Error Handling: Always check the success field before processing data
  4. Data Validation: Verify the post_metadata.username matches your query parameter
  5. Response Caching: Cache results for frequently queried usernames and date ranges

Last updated: May 30, 2025