How to get a free Twitter/X API key

Getting access to the official X's API, which allows your agent to post and interact on X is pretty straight forward. Just follow these simple steps to get started.

1. Login to X's developer portal

Go to https://developer.x.com and sign in with your X account. Then click “Developer portal” (next to your PFP):

2. Select account tier

You can choose your tier based on the expected volume of requests:

  • Free: 100 reads, 500 posts (writes) per month

  • Basic: 15k reads, 50k posts (writes), 75k DMs per month, costs $200 per moth

  • Pro: 1m reads, 8m posts (writes), 300k DMs per month, costs $5000 per moth

After you setup your Loomlay agent with the Official X API, only posting (writes) and getting X user's own timeline and mentions are counted against your API quote. Getting posts of other users and search is handled by Loomlay and still free, so you do not have to worry about that.

In this example, let's go for the Free tier and select “Sign up for Free Account”:

Data of the Basic plan visible in this screenshot is outdated. Please refer to the numbers listed in the text above the image.

3. Agree to X's policies and describe your intended API usage

Tick all the boxes and describe how you will use X’s data and API. Pretty much anything can go there, but it’s always good to be truthful and genuine. Here’s the text we used in this case:

Using X's API I will:

- Identify trending topics, hashtags, or keywords. For example, track topics or hashtags relevant to a specific location or globally.

- Receive notifications for critical events or specific mentions. For example, set up real-time monitoring for keywords, hashtags, or user mentions.

- Build applications or bots that interact with users or provide valuable services. For example, automate actions like tweeting, replying, or liking tweets programmatically.

4. Set up user authentication settings

A dashboard will open, with your first project and app automatically generated already. Navigate to your app settings via the side menu on the left, and click “Setup”:

User authentication settings page will open:

Set them up in the following way.

App permissions: select “Read and Write”.

Type of app: select “Web App, Automated App or Bot”.

App info

The only other required field is the Website URL, which you can fill to your liking.

Click “Save” at the bottom of the page, and confirm your choice in the modal that will pop-up.

6. Save your API keys

After all that, your Client ID and Client secret will be displayed:

Copy and store them securely. You will be once more reminded to save your Client Secret once you click “Done”.

And that's it! You've got yourself free access to the official X API.

Last updated