Twitter API v2
  1. Spaces
Twitter API v2
  • General
    • Returns the open api spec document.
      GET
  • Spaces
    • Space lookup up Space IDs
      GET
    • Space lookup by their creators
      GET
    • Search for Spaces
      GET
    • Space lookup by Space ID
      GET
  • Tweets
    • Tweet lookup by Tweet IDs
      GET
    • Full archive search counts
      GET
    • Recent search counts
      GET
    • Sample stream
      GET
    • Full-archive search
      GET
    • Recent search
      GET
    • Filtered stream
      GET
    • Rules lookup
      GET
    • Add/Delete rules
      POST
    • Tweet lookup by Tweet ID
      GET
    • Hide replies
      PUT
    • Returns Tweet objects liked by the provided User ID
      GET
    • Causes the user (in the path) to like the specified tweet
      POST
    • Causes the user (in the path) to unlike the specified tweet
      DELETE
    • User mention timeline by User ID
      GET
    • Causes the user (in the path) to retweet the specified tweet
      POST
    • Causes the user (in the path) to unretweet the specified tweet
      DELETE
    • User Tweets timeline by User ID
      GET
  • Users
    • Returns user objects that have liked the provided Tweet ID
      GET
    • Returns user objects that have retweeted the provided Tweet ID
      GET
    • User lookup by IDs
      GET
    • User lookup by usernames
      GET
    • User lookup by username
      GET
    • User lookup by ID
      GET
    • Returns user objects that are blocked by provided user ID
      GET
    • Block User by User ID
      POST
    • Returns user objects that follow the provided user ID
      GET
    • Following by User ID
      GET
    • Follow User
      POST
    • Mute User by User ID
      POST
    • Unblock User by User ID
      DELETE
    • Unfollow User
      DELETE
    • Unmute User by User ID
      DELETE
  1. Spaces

Space lookup by their creators

GET
/2/spaces/by/creator_ids
Spaces
Returns a variety of information about the Spaces created by the provided User IDs
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.twitter.com/2/spaces/by/creator_ids?user_ids='
Response Response Example
200 - Example 1
{
  "data": [
    {
      "created_at": "2021-07-06T18:40:40.000Z",
      "creator_id": "2244994945",
      "host_ids": [
        "2244994945"
      ],
      "id": "1SLjjRYNejbKM",
      "invited_user_ids": [
        "2244994945"
      ],
      "is_ticketed": "false",
      "lang": "en",
      "participant_count": 10,
      "scheduled_start": "2021-07-06T18:40:40.000Z",
      "speaker_ids": [
        "2244994945"
      ],
      "started_at": "2021-7-14T04:35:55Z",
      "state": "live",
      "title": "Spaces are Awesome",
      "updated_at": "2021-7-14T04:35:55Z"
    }
  ],
  "errors": [
    {
      "detail": "string",
      "title": "string",
      "status": 0,
      "type": "about:blank"
    }
  ],
  "includes": {
    "media": [
      {
        "height": 0,
        "media_key": "string",
        "width": 0,
        "alt_text": "string",
        "type": "photo",
        "url": "http://example.com"
      }
    ],
    "places": [
      {
        "contained_within": [
          "f7eb2fa2fea288b1"
        ],
        "country": "United States",
        "country_code": "US",
        "full_name": "Lakewood, CO",
        "geo": {
          "bbox": [
            -105.193475,
            39.60973,
            -105.053164,
            39.761974
          ],
          "geometry": {
            "coordinates": [
              -105.18816086351444,
              40.247749999999996
            ],
            "type": "Point"
          },
          "properties": {},
          "type": "Feature"
        },
        "id": "f7eb2fa2fea288b1",
        "name": "Lakewood",
        "place_type": "city"
      }
    ],
    "polls": [
      {
        "duration_minutes": 0,
        "end_datetime": "2019-08-24T14:15:22Z",
        "id": "1365059861688410112",
        "options": [
          {
            "label": "string",
            "position": 0,
            "votes": 0
          },
          {
            "label": "string",
            "position": 0,
            "votes": 0
          }
        ],
        "voting_status": "open"
      }
    ],
    "tweets": [
      {
        "author_id": "2244994945",
        "created_at": "Wed Jan 06 18:40:40 +0000 2021",
        "id": "1346889436626259968",
        "text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i"
      }
    ],
    "users": [
      {
        "created_at": "2013-12-14T04:35:55Z",
        "id": "2244994945",
        "name": "Twitter Dev",
        "protected": false,
        "username": "TwitterDev"
      }
    ]
  }
}

Request

Query Params
user_ids
array[string]
required
The users to search through
space.fields
array[string]
optional
A comma separated list of Space fields to display.
expansions
array[string]
optional
A comma separated list of fields to expand.

Responses

🟢200The request was successful
application/json
Body
data
array[object (Space) {14}] 
optional
>= 0 items
created_at
string <date-time>
optional
Creation time of the space
Example:
2021-07-06T18:40:40.000Z
creator_id
string 
optional
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Example:
2244994945
Match pattern:
^[0-9]{1,19}$
host_ids
array[string]
optional
The user ids for the hosts of the space
id
string 
required
The unique identifier of this Space.
Example:
1SLjjRYNejbKM
Match pattern:
^[a-zA-Z0-9]{1,13}$
invited_user_ids
array[string]
optional
An array of user ids for people who were invited to a space
is_ticketed
boolean 
optional
Denotes if the space is a ticketed space
Example:
false
lang
string 
optional
The language of the space
Example:
en
participant_count
integer <int32>
optional
The number of participants in a space
Example:
10
scheduled_start
string <date-time>
optional
A date time stamp for when a space is scheduled to begin
Example:
2021-07-06T18:40:40.000Z
speaker_ids
array[string]
optional
An array of user ids for people who were speakers in a space
started_at
string <date-time>
optional
When the space was started as a date string
Example:
2021-7-14T04:35:55Z
state
enum<string> 
required
The current state of the space.
Allowed values:
livescheduledended
Example:
live
title
string 
optional
The title of the space
Example:
Spaces are Awesome
updated_at
string <date-time>
optional
When the space was last updated
Example:
2021-7-14T04:35:55Z
errors
array[null (Problem) {17}] 
optional
>= 1 items
object 
GenericProblem
optional
A generic problem with no additional information beyond that provided by the HTTP status code.
object 
InvalidRequestProblem
optional
A problem that indicates this request is invalid.
object 
ClientForbiddenProblem
optional
A problem that indicates your client is forbidden from making this request.
object 
ResourceNotFoundProblem
optional
A problem that indicates that a given Tweet, User, etc. does not exist.
object 
ResourceUnavailableProblem
optional
A problem that indicates a particular Tweet, User, etc. is not available to you.
object 
ResourceUnauthorizedProblem
optional
A problem that indicates you are not allowed to see a particular Tweet, User, etc.
object 
FieldUnauthorizedProblem
optional
A problem that indicates that you are not allowed to see a particular field on a Tweet, User, etc.
object 
DisallowedResourceProblem
optional
A problem that indicates that the resource requested violates the precepts of this API.
object 
UnsupportedAuthenticationProblem
optional
A problem that indicates that the authentication used is not supported.
object 
UsageCapExceededProblem
optional
A problem that indicates that a usage cap has been exceeded.
object 
ConnectionExceptionProblem
optional
A problem that indicates something is wrong with the connection
object 
ClientDisconnectedProblem
optional
Your client has gone away.
object 
OperationalDisconnectProblem
optional
You have been disconnected for operational reasons.
object 
RulesCapProblem
optional
You have exceeded the maximum number of rules.
object 
InvalidRuleProblem
optional
The rule you have submitted is invalid.
object 
DuplicateRuleProblem
optional
The rule you have submitted is a duplicate.
object 
ConflictProblem
optional
You cannot create a new job if one is already in progress.
includes
object (Expansions) 
optional
media
array[null (Media) {3}] 
optional
>= 1 items
places
array[object (Place) {8}] 
optional
>= 1 items
polls
array[object (Poll) {5}] 
optional
>= 1 items
tweets
array[object (Tweet) {20}] 
optional
>= 1 items
users
array[object (User) {14}] 
optional
>= 1 items
🔴500500
Modified at 2022-09-10 21:25:17
Previous
Space lookup up Space IDs
Next
Search for Spaces
Built with