> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Get all entries

GET https://cdn.contentful.com/spaces/{space_id}/environments/{environment_id}/entries

Returns all entries in a space; linked items appear in the `includes` array when not already in `items`. Use [query search parameters](/references/content-delivery-api/search-parameters) to filter by content type or other fields.

Reference: https://contentful.com/developers/docs/references/content-delivery-api/entries/get-all-entries

## Request

### Path parameters

- `space_id` (string, required) — Alphanumeric id of the space to retrieve.
- `environment_id` (string, required) — ID of the environment in form of a string

### Query parameters

- `access_token` (string, required) — A *production* Content Delivery API key.

## Response

### 200

OK - Request successful

- `map from string to any`

## Examples

**Response**

```json
{
  "items": [],
  "limit": 100,
  "skip": 0,
  "sys": {
    "type": "Array"
  },
  "total": 0
}
```

**SDK Code**

```android Android
// Create the Contentful client.
final CDAClient client =
    CDAClient
        .builder()
        .setToken("<access_token>")
        .setSpace("<space_id>")
        .setEnvironment("<environment_id>")
        .build();

client
    .observe(CDAEntry.class)
    .all()
    // Execute result handling on the `main thread`.
    .observeOn(AndroidSchedulers.mainThread())
    // Networking should happen on io thread.
    .subscribeOn(io.reactivex.schedulers.Schedulers.io())
    .subscribe(
        new DisposableSubscriber<CDAArray>() {
          CDAArray result;

          @Override public void onComplete() {
            // Do something with the result.
            new AlertDialog.Builder(context)
                .setTitle("Contentful")
                .setMessage("Result: "
                    + (result == null ? "<null>" : result.toString()))
                .show();
          }

          @Override public void onError(Throwable e) {
            // Handle error case.
            new AlertDialog.Builder(context)
                .setTitle("Contentful")
                .setMessage("An error occurred: " + e.toString())
                .show();
          }

          @Override public void onNext(CDAArray array) {
            // Array received, maybe more to come.
            result = array;
          }
        }
    );
```

```java Java
// Create the Contentful client.
final CDAClient client =
    CDAClient
        .builder()
        .setToken("<access_token>") // required
        .setSpace("<space_id>") // required
        .setEnvironment("<environment_id>") // optional, defaults to `master`
        .build();

final CDAArray all =
    client
        .fetch(CDAEntry.class)
        .all();
```

```kotlin Kotlin
// Create the Contentful client.
val client = CDAClient
        .builder()
        .setToken("<access_token>") // required
        .setSpace("<space_id>") // required
        .setEnvironment("<environment_id>") // optional, defaults to `master`
        .build()

val all = client
        .fetch(CDAEntry::class.java)
        .all()
```

```swift Swift
import Contentful

// Retain the client as a property on a type you define so that 
// the client's asynchronous network callbacks are executed.
let client = Client(spaceId: "<space_id>",
                    environmentId: "<environment_id>", // Defaults to "master" if omitted
                    accessToken: "<access_token>")

client.fetchArray(of: Entry.self) { (result: Result<ArrayResponse<Entry>>) in
  switch result {
  case .success(let arrayResponse):
    let entries = arrayResponse.items
    print(entries)
  case .error(let error):
    print(error)      
  }
}
```

```javascript JavaScript
import { createClient } from 'contentful-management'

const client = createClient({
  space: '<space_id>',
  environment: '<environment_id>', // defaults to 'master' if not set
  accessToken: '<content_delivery_api_key>'
})

client.getEntries()
.then((response) => console.log(response.items))
.catch(console.error)
```

```php PHP
// contentful.php 3.0

$client = new Contentful\Delivery\Client(
  '<content_delivery_api_key>',
  '<space_id>',
  '<environment_id>' // Defaults to "master" if ommitted
);

$entries = $client->getEntries();
```

```ruby Ruby
require 'contentful'

client = Contentful::Client.new(
  space: '<space_id>',
  access_token: '<content_delivery_api_key>',
  environment: 'master',  # Optional - defaults to 'master'.
  dynamic_entries: :auto  # Enables Content Type caching.
)

entries = client.entries
```

```python Python
from contentful import Client

client = Client(
  '<space_id>',
  '<content_delivery_api_key>',
  environment='master'  # Optional - it defaults to 'master'.
)

entries = client.entries()
```

```.net .NET
// This client should only be created once per application.
var httpClient = new HttpClient();

var client = new ContentfulClient(httpClient, "<content_delivery_api_key>", "<content_preview_api_key>", "<space_id>");

var entries = await client.GetEntries<YourClass>();
// entries will be an IEnumerable<YourClass>.
```