# X Ads

> Read X advertising accounts, campaigns, ad groups, creatives, audiences and performance metrics.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/x-ads

## Actions

### Get account

Get account in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get account permissions

Get account permissions in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.

**Outputs**: Response.

- `data` (object): Account access response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "permissions": [],
      "user_id": "Example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get analytics

Read synchronous advertising metrics for up to 20 entity IDs and at most seven days. Longer reports require the asynchronous Ads API.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Entity (`entity`, text, required): Entity. One of: `ACCOUNT`, `CAMPAIGN`, `LINE_ITEM`, `PROMOTED_TWEET`, `MEDIA_CREATIVE`, `FUNDING_INSTRUMENT`.
- Entity IDs (`entity_ids`, list, required): Entity ids.
- Granularity (`granularity`, text, required): Granularity. One of: `HOUR`, `DAY`, `TOTAL`.
- Placement (`placement`, text, required): Placement. One of: `ALL_ON_TWITTER`, `PUBLISHER_NETWORK`.
- Metric groups (`metric_groups`, list, required): Metric groups. One or more of: `ENGAGEMENT`, `BILLING`, `VIDEO`, `WEB_CONVERSION`, `MOBILE_CONVERSION`, `LIFE_TIME_VALUE`, `MEDIA`.
- Start time (`start_time`, date and time, required): Start time.
- End time (`end_time`, date and time, required): End time.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get campaign

Get campaign in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Record (`record_id`, text, required): Record id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get custom audience

Get custom audience in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Record (`record_id`, text, required): Record id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get funding instrument

Get funding instrument in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Record (`record_id`, text, required): Record id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get line item

Get line item in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Record (`record_id`, text, required): Record id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get media creative

Get media creative in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Record (`record_id`, text, required): Record id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get promoted post

Get promoted post in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Record (`record_id`, text, required): Record id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List accounts

List accounts in X Ads.

**Inputs**

- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List campaigns

List campaigns in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List custom audiences

List custom audiences in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List funding instruments

List funding instruments in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List line items

List line items in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List media creatives

List media creatives in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List promoted tweets

List promoted tweets in X Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```
