DataPI.

What would you like to understand?

Preparing search…
    All results and search filters →

    Operation contract · X

    social.x.posts.search

    Searches public X posts by text or supported search syntax; result coverage and ranking vary by source.

    Unavailable at captureX post searchAsync: yesSync: not supported
    Unavailable at capture

    Contract identity

    Contract version
    1.0.0
    Last verified
    Executable operations
    11 / 40

    Verified means the contract snapshot on this date was read and matched to the page. It is not a promise that an operation is live for your workspace.

    Runtime contract description

    Searches public X posts by text or supported search syntax; result coverage and ranking vary by source.

    Input schema

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequiredadditional properties: falseField description is not supplied by the contract.
    querystringRequiredmin length: 1 · max length: 200Field description is not supplied by the contract.
    limitintegerOptionalmin: 1 · max: 100 · default: 20Maximum number of records to return.

    Request example

    Request example
    {
      "operation": "social.x.posts.search",
      "input": {
        "query": "photography",
        "limit": 20
      },
      "mode": "async"
    }
    cURL
    curl --fail-with-body -X POST https://api.datapi.ir/v1/requests \
      -H "Authorization: Bearer $DATAPI_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"operation":"social.x.posts.search","input":{"query":"photography","limit":20},"mode":"async"}'

    Output schema

    FieldTypeRequiredConstraints / defaultDescription
    (body)objectRequiredadditional properties: falseField description is not supplied by the contract.
    itemsarray<object>Requiredmax items: 100Field description is not supplied by the contract.
    items[]objectRequiredadditional properties: falseField description is not supplied by the contract.
    items[].idstringOptional—Field description is not supplied by the contract.
    items[].urlstring (uri)Optionalformat: uriField description is not supplied by the contract.
    items[].author_idstringOptional—Field description is not supplied by the contract.
    items[].author_usernamestringOptional—Field description is not supplied by the contract.
    items[].author_namestringOptional—Field description is not supplied by the contract.
    items[].titlestringOptional—Field description is not supplied by the contract.
    items[].textstringOptional—Field description is not supplied by the contract.
    items[].published_atstring (date-time)Optionalformat: date-timeField description is not supplied by the contract.
    items[].content_typestringOptional—Field description is not supplied by the contract.
    items[].likes_countintegerOptionalmin: 0Field description is not supplied by the contract.
    items[].comments_countintegerOptionalmin: 0Field description is not supplied by the contract.
    items[].shares_countintegerOptionalmin: 0Field description is not supplied by the contract.
    items[].views_countintegerOptionalmin: 0Field description is not supplied by the contract.
    items[].hashtagsarray<string>Optional—Field description is not supplied by the contract.
    items[].hashtags[]stringRequired—Field description is not supplied by the contract.
    items[].mentionsarray<string>Optional—Field description is not supplied by the contract.
    items[].mentions[]stringRequired—Field description is not supplied by the contract.
    items[].media_urlsarray<string (uri)>Optional—Field description is not supplied by the contract.
    items[].media_urls[]string (uri)Requiredformat: uriField description is not supplied by the contract.
    items[].thumbnail_urlstring (uri)Optionalformat: uriField description is not supplied by the contract.
    items[].media_typesarray<string>Optional—Field description is not supplied by the contract.
    items[].media_types[]stringRequired—Field description is not supplied by the contract.
    items[].audio_titlestringOptional—Field description is not supplied by the contract.
    items[].audio_artiststringOptional—Field description is not supplied by the contract.
    items[].audio_urlstring (uri)Optionalformat: uriField description is not supplied by the contract.
    items[].location_namestringOptional—Field description is not supplied by the contract.
    items[].languagestringOptional—Field description is not supplied by the contract.
    items[].duration_secondsnumberOptionalmin: 0Field description is not supplied by the contract.
    items[].is_paid_partnershipbooleanOptional—Field description is not supplied by the contract.
    items[].is_repostbooleanOptional—Field description is not supplied by the contract.
    items[].is_replybooleanOptional—Field description is not supplied by the contract.
    items[].observed_atstring (date-time)Optionalformat: date-timeField description is not supplied by the contract.

    Example result

    This is the eventual operation data, not the HTTP 202 acceptance response or a live result. Submit the request, poll its status, then retrieve the result after success.

    Example result
    {
      "items": []
    }

    How to call it

    1. Check availability with GET /v1/operations/{operation_id}.
    2. POST {operation, input, mode:"async"} to /v1/requests with an Idempotency-Key.
    3. Poll status_url or wait for the signed completion webhook.
    4. Read result_url only when result.available is true; 409 result_not_ready means wait, 410 result_expired means re-run the work.
    Test this workflow in the API explorer

    Availability and limits

    • All current operations support async only; mode=sync returns mode_not_supported.
    • Size and runtime limits are declared by this operation contract; do not treat them as a global SLA.
    • Results remain available for the retention window after success, then return 410.

    Analytics computed from this data

    An operation collects data; a metric family turns it into a number. These families are computed from this platform and data type, and each one states its formula and limits.

    Use cases that need this operation

    Related pages

    Runtime contract snapshot: DataPI API v1.0.0 · 75 HTTP operations documented of 265 runtime operations · 40 catalog operations · 11 available at capture. Captured: . Source: https://api.datapi.ir/v1/contracts.