X (Twitter)post/translate/detect

Detect

Translation
Cost / request

$0.01

Response format

JSON

Protocol

REST

About this endpoint

Access X data through agntdata: Detect. This endpoint will return the Language of the Text. Responses are structured JSON for AI agents, analytics, and automation — one API key instead of juggling upstream accounts. Ideal when you need tweets, user profiles, followers, search, and hashtag streams programmatically.

Use cases

AI agents that need X data in structured form
Analytics and monitoring pipelines for X content
Research and GTM workflows that combine X signals with other data

Parameters

bodyRequest Body

Content type: application/json

{
  "type": "object",
  "properties": {
    "text": {
      "type": "string"
    }
  }
}

Responses

Response

{
  "type": "object",
  "properties": {
    "lang": {
      "type": "string"
    },
    "confidence": {
      "type": "integer"
    },
    "script": {
      "type": "string"
    },
    "is_reliable": {
      "type": "boolean"
    }
  }
}

Agent / Developer Schema

Machine-readable formats for integrating this endpoint into AI agents and toolchains.

{
  "operationId": "Detect_post__translate_detect",
  "method": "post",
  "path": "/translate/detect",
  "summary": "Detect",
  "description": "This endpoint will return the Language of the Text",
  "parameters": [],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            }
          }
        },
        "example": {
          "text": "A panel on AI at the Paris Peace Forum today.  Starting at 42'00, I plot the future of AI: all of our interactions with the digital world will be mediated by AI assistants that will eventually become smarter than us. Because they will become a common infrastructure containing all human culture and knowledge, they will need to be open/open source, just like the software infrastructure of the Internet is open/open source, and their training will need to be crowd-sourced, just like Wikipedia (see 46'00 in) This is one reason Meta made Llama-2 open/open source/free.  In response to my tirade, Microsoft President Brad Smith had a very curious response (48'00). He said \"Meta is owned by shareholders. OpenAI is owned by a nonprofit . Which would you have more confidence in? Getting your technology from a non profit? or a for-profit company that is entirely controlled by one human being?\" This totally misrepresents what open access/open source means.  I thought Microsoft had moved beyond its anti open source stance of the 1990s.  Doesn't Azure run on Linux these days?"
        }
      }
    }
  },
  "responses": [
    {
      "statusCode": "200",
      "description": "Response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "lang": {
                "type": "string"
              },
              "confidence": {
                "type": "integer"
              },
              "script": {
                "type": "string"
              },
              "is_reliable": {
                "type": "boolean"
              }
            }
          },
          "example": {
            "lang": "eng",
            "confidence": 1,
            "script": "Latin",
            "is_reliable": true
          }
        }
      }
    }
  ]
}

Pricing

$0.01per successful request

Credits are deducted from your agntdata balance on each successful API call. Failed requests (4xx/5xx) are not charged.

Related endpoints

Start using this endpoint

Generate your API key and make your first call in under a minute. Free tier available with transparent pricing.

X APIX data APIdetect APIAI agents data APIX APIX data APIX for AI agents