# Get

## Retrieve a list of your embeds

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                         | Default                                                                      |
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                | 0                                                                            |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                               | 10                                                                           |
| sort           | optional            | String    | Sort results ascending or descendening (asc or desc)                                                                                | desc                                                                         |
| return\_fields | optional            | String    | Customize the responses by setting the return fields ('id', 'user\_id', 'document\_id', 'type', 'create\_date', 'code', 'settings') | 'id', 'user\_id', 'document\_id', 'type', 'create\_date', 'code', 'settings' |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/embeds.json?offset=0&limit=5&sort=desc&return_fields=id,code"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 2,
    'offset' => 0,
    'sort' => 'desc',
    'return_fields' => 'id,code'
);
$listEmbeds = $yumpu->getEmbeds($data);
print_r($listEmbeds);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  offset: 0,
  limit: 2,
  sort: 'desc',
  return_fields: 'id,code'
};
yumpu.getEmbeds(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=2", "offset=0", "sort=desc", "return_fields=id,code"};
System.out.println(y.getEmbeds(params));
```

{% endtab %}
{% endtabs %}

Whatever language you are using, the result will be the same.

```bash
{
  "total": 481,
  "embeds": [
    {
      "id": "zwU3OPgTkL7SCfDj",
      "code": "<iframe width=\"620px\" height=\"566px\" src=\"https://www.yumpu.com/en/embed/view/zwU3OPgTkL7SCfDj\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>"
    },
    {
      "id": "zxaNBp4k12QCMvlP",
      "code": "<iframe width=\"64px\" height=\"64px\" src=\"https://www.yumpu.com/en/embed/view/zxaNBp4k12QCMvlP\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>"
    }
  ],
  "state": "success",
  "completed_in": 0.177
}
```
