x23.ai API v1 beta (1.0.0)

Download OpenAPI specification:Download

The x23.ai API v1 provides access to most of the data available on the x23.ai app.


🔐 Authentication

You must have an API key to use this API.
To obtain an API key:

  1. Sign up or log in at x23.ai
  2. Navigate to the Settings → API Key section
  3. Generate your API key there

💳 API Access Tiers

These are the currently available access tiers.
You can manage your plan and billing anytime via the Pricing Page.

Rate limit per minute, daily quota per day, and max quota per month.

Tier Rate Limit Daily Quota Max Quota
Free 1 5 10
Essential 10 1,000 10,000
Pro 50 50,000 1,000,000
Agent 5,000 500,000 10,000,000

🚧 Status & Feedback

This API is actively being developed.

If you have feedback or suggestions, please reach out!


Get supported protocols

A list of the supported protocols/DAOs/communities, and the content item types that can be fetched for each.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json

The list of supported protocols may be long.

{
  • "status": "success",
  • "result": {
    }
}

Get supported item types

A list of the supported item types.

These usually correspond to a specific data source such as governance forums, snapshot, onchain proposals, etc.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json

The list of supported item types.

{
  • "status": "success",
  • "result": {
    }
}

Retrieve recent feed items

Retrieve a list of the most recent newsfeed items, in chronological order.

This is the same feed as shown on the main x23.ai newsfeeds.

Authorizations:
ApiKeyAuth
Request Body schema: application/json

Request payload

maxUnixTimestamp
number <= 14 days in the past as a unix timestamp

Maximum unix timestamp (in seconds).

protocols
Array of strings
Default: []

Protocols to fetch items from. If empty, fetch from all protocols.

itemTypes
Array of strings
Default: []

Item types to fetch. If empty, fetch all item types.

limit
number
Default: 100

Maximum number of items to fetch.

Responses

Request samples

Content type
application/json
{
  • "protocols": [
    ],
  • "limit": 3
}

Response samples

Content type
application/json

The list of recent feed items

{
  • "status": "success",
  • "result": {
    }
}

Retrieve top scored items

Retrieves a list of the top scored items, as shown under the Trending section on the x23.ai newsfeeds.

Scores (aka controversy scores) are calculated based on a combination of factors per item type, such as votes, comments, views, authors, etc.

Authorizations:
ApiKeyAuth
Request Body schema: application/json

Top score feed request payload

maxUnixTimestamp
number <= 14 days in the past as a unix timestamp

Maximum unix timestamp (in seconds).

protocols
Array of strings
Default: []

Protocols to fetch items from. If empty, fetch from all protocols.

itemTypes
Array of strings
Default: []

Item types to fetch. If empty, fetch all item types.

limit
number
Default: 100

Maximum number of items to fetch.

scoreThreshold
number
Default: 3000

Minimum score threshold for items to be included, between 0 and ~5000

Responses

Request samples

Content type
application/json
{
  • "protocols": [
    ],
  • "scoreThreshold": 2200,
  • "limit": 3
}

Response samples

Content type
application/json

The list of top scored items

{
  • "status": "success",
  • "result": {
    }
}

Retrieve daily/weekly/monthly digests

Retrieve a digest for a specific time period, e.g., daily, weekly, monthly.

The digest can be seen on the x23.ai app when specific protocol filters are applied on the main newsfeed, or on the protocol specific pages (e.g., Aave Newsfeed).

The digest feed is a summary of the most important items from the specified time period, usually limited to the top 3-5 items per protocol.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Digest feed request payload

protocols
Array of strings
Default: []

Protocols to fetch items from. If empty, fetch from all protocols.

timePeriod
required
enum
Enum: "daily" "weekly" "monthly"

The selected time period for the digest.

unixTimestamp
number
Default: null

Unix timestamp (in seconds) for the start of the time period. When not provided, the current time is used.

Responses

Request samples

Content type
application/json
{
  • "protocols": [
    ],
  • "timePeriod": "daily",
  • "unixTimestamp": 1740572893
}

Response samples

Content type
application/json

An array of digest items

{
  • "status": "success",
  • "result": {
    }
}

Perform keyword search

Performs a keyword search across all content items, with optional filters.

Note: the search is performed on the content items' titles, headlines, digests, and other relevant fields. It will match exact (and slight misspellings) of the keyword(s).

If no results are returned, try shortening your query or using different keywords.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Keyword search request payload

query
required
string

The keyword(s) to search for.

sortByRelevance
boolean
Default: true

Sort results by relevance, if false, sort by date.

protocols
Array of strings
Default: []

Protocols to fetch items from. If empty, fetch from all protocols.

itemTypes
Array of strings
Default: []

Item types to fetch. If empty, fetch all item types.

limit
number
Default: 20

Maximum number of items to fetch.

Note: larger values will impact performance.

Responses

Request samples

Content type
application/json
{
  • "query": "optimism grants season 7",
  • "sortByRelevance": true,
  • "protocols": [
    ],
  • "itemTypes": [
    ],
  • "limit": 20
}

Response samples

Content type
application/json

The list of keyword search results

{
  • "status": "success",
  • "result": {
    }
}

Perform RAG/vector search

Performs a RAG/vector search across all content items, with optional filters.

This is useful for Retrieval Augmented Generation (RAG) and 'Related' search, where the search query is used to find similar items based on the query and similarity threshold. This can help with creating more accurate answers to questions, or recommending similar content.

In the background, we create vector embeddings of your query, compare it to all our existing content embeddings, then use cosine vector similarity to find the most similar items. We then filter and return the relevant items as human readable objects.

Note: Vector search does not match exact keywords, but rather finds similar content based on the query. Use keyword search for exact matches, or hybrid search for a combination of both.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

RAG search request payload

query
required
string

The query to perform a similarity/vector search on.

similarityThreshold
number
Default: 0.4

The similarity threshold for the search, between 0 and 1. Higher values are more strictly similar.

protocols
Array of strings
Default: []

Protocols to include in the vector search. If empty, include all protocols.

itemTypes
Array of strings
Default: []

Item types to include in the vector search. If empty, include all item types.

limit
number
Default: 5

Maximum number of items to fetch.

Responses

Request samples

Content type
application/json
{
  • "query": "optimism grants season 7",
  • "similarityThreshold": 0.5,
  • "protocols": [
    ],
  • "itemTypes": [
    ]
}

Response samples

Content type
application/json

The list of RAG search results

{
  • "status": "success",
  • "result": {
    }
}

Perform hybrid search

Performs a hybrid search across all content items, with optional filters.

This is a combination of keyword search and RAG/vector search, where the search query is used to find similar items based on the query and similarity threshold, as well as exact matches based on the keywords. The combined results are then deduplicated and returned.

This is ideal for AI assistants, bots, and agents, as it can ensure accurate answers to questions using the most relevant context.

Note: Due to the way the different search methods work, the results should be re-ranked based on your specific use case.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Hybrid search request payload

query
required
string

The query to perform a hybrid search on.

protocols
Array of strings
Default: []

Protocols to include in the hybrid search. If empty, include all protocols.

itemTypes
Array of strings
Default: []

Item types to include in the hybrid search. If empty, include all item types.

limit
number
Default: 5

Maximum number of items to fetch.

similarityThreshold
number
Default: 0.4

The similarity threshold for the RAG/vector search component, between 0 and 1. Higher values are more strictly similar.

Responses

Request samples

Content type
application/json
{
  • "query": "polygon delisting"
}

Response samples

Content type
application/json

The list of hybrid search results

{
  • "status": "success",
  • "result": {
    }
}