Secure Data Indexing & Search API

The Masa Search API provides developers with a TEE-based, secure, and scalable search and indexing solution. It enables on-demand data scraping and indexing for structured queries, including X/Twitter content, while ensuring data integrity and controlled access.

Get Early Access

Join our private beta and get exclusive access to the Masa Data API:

  • Free access during beta testing phase
  • Priority support from our engineering team
  • Shape the future of decentralized data indexing

Request Your API Key β†’

Key Features

πŸ”„ Data Collection

  • TEE-powered node system
  • Real-time data indexing
  • Secure scraping environment

πŸ“Š Storage & Indexing

  • Efficient vector storage
  • Optimized search capabilities
  • Scalable retrieval system

πŸ”’ Security & Access

  • Rate limiting (3 tweets/sec)
  • Request monitoring
  • Abuse prevention

🐦 Search Capabilities

  • Structured search queries
  • Compatible with twitter-scraper
  • Advanced filtering options

πŸ‘¨β€πŸ’» Developer Experience

  • Interactive Swagger docs
  • Code examples (cURL, Python)
  • Step-by-step guides

Beta Access: Join our beta program to get rate-limited API access (3 requests/second) and dedicated technical support to help you build with the Masa Data API. Apply now to get started.

How It Works

  1. Request an API Key – Fill out our quick form to get started
  2. Submit a Scrape Job – Call the scraping endpoint to index specific X/Twitter content
  3. Monitor Job Status – Track progress using job UUIDs
  4. Retrieve Results – Access indexed content via structured API calls

Getting Started

  • Initial Endpoints: V1 includes parity with the protocol-based indexing system, with future expansion planned
  • Developer Guide: Private docs with step-by-step setup instructions and example API calls
  • API Documentation: GitHub Repository for the Masa Data API

Ready to start building? Join our growing community of developers and get your API key today. Our team will review your application within 2 business days.

Request API Access β†’

This API is designed for fast, reliable, and controlled access to indexed data, making it a powerful tool for developers needing real-time insights from the Masa network and X/Twitter. πŸš€

The Twitter Search API allows you to search and retrieve tweets based on keywords, hashtags, and other criteria. The search functionality provides:

  • Real-time Results: Get the latest tweets matching your search criteria
  • Flexible Queries: Search by keywords, hashtags, mentions, and more
  • Rate Limited: 3 requests per second per API key
  • Structured Data: Results include tweet text, metadata, and engagement metrics

Key endpoints:

MethodEndpointDescription
POST/v1/search/live/twitterSubmit a Twitter search
GET/v1/search/live/twitter/status/<jobUUID>Check job status
GET/v1/search/live/twitter/result/<jobUUID>Get search results

πŸ” Authentication

  • Type: Bearer Token
  • Header: Authorization: Bearer <API_KEY>
Please note that the API is currently in active development. You may occasionally need to rerun jobs as we make improvements and updates to the system.

X/Twitter search workflow

1

Submit X/Twitter search job

Replace <API_KEY> with your actual API key. API keys are only available to early access partners at this.
  • Base API endpoint: https://api1.dev.masalabs.ai
  • Replace <API_KEY> with your provided API key
  • Query supports advanced Twitter search operators (e.g., β€œfrom:user”, β€œsince:YYYY-MM-DD”)
  • max_results determines how many tweets to return (up to 100 per request)
  • Currently limited to tweets from the last 7 days (historical data coming in next release)
curl https://api1.dev.masalabs.ai/v1/search/live/twitter \
  -H "Authorization: Bearer <API_KEY>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "query": "#AI trending",
    "max_results": 100     
  }'
  • The max_results parameter is optional and defaults to 100. The maximum number of tweets that can be returned per request is 100 for now.
  • Currently, searches are limited to tweets from the last 7 days. Historical data access will be available in a future release.

Response:

{
  "uuid": "5a7b9c12-3d4e-5f6g-7h8i-9j0k1l2m3n4o",
  "error": ""
}
2

Check Job Status

Use the uuid returned from the previous step to check your job status:

curl https://api1.dev.masalabs.ai/v1/search/live/twitter/status/<RETURNED_UUID> \
  -H "Authorization: Bearer <API_KEY>"

For example, if your returned UUID was β€œ5a7b9c12-3d4e-5f6g-7h8i-9j0k1l2m3n4o”:

curl https://api1.dev.masalabs.ai/v1/search/live/twitter/result/status/5a7b9c12-3d4e-5f6g-7h8i-9j0k1l2m3n4o \
  -H "Authorization: Bearer <API_KEY>"

Response:

{
  "status": "processing",  // Job is currently being processed
  "error": ""
}

The status field can be one of:

  • "processing": Job is actively being processed
  • "done": Job completed successfully
  • "error": Job failed with an error
  • "error(retrying)": Job failed but system is automatically retrying
3

Retrieve Results

Once the job status shows β€œdone”, use your UUID to retrieve the search results:

curl https://api1.dev.masalabs.ai/v1/search/live/twitter/result/<RETURNED_UUID> \
    -H "Authorization: Bearer <API_KEY>"

Response:

[
{
"ID": "456013170523684434",
"Content": "Bitcoin($BTC) going to $100k soon 😎",
"Metadata": null,
"Score": 1
}
]
The Metadata field is currently null. Near future release will include metadata for each tweet.

Advances search X/Twitter API

For advanced search API documentation, please see the Masa protocol X/Twitter advanced search documentation. Please note that the API is currently in active development and the documentation is subject to change.