# Latest Movies

## Latest Movies

## Get Latest Movies

<mark style="color:blue;">`GET`</mark> `https://api.phantommovies.com/3/movies/latest`

Get all Latest movies

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    status: "nothing_found",
    message: "No movies found."
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```
curl -X GET "https://api.phantommovies.com/3/movies/movie/latest -H "Authorization: Bearer YourAPIKey"
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const axios = require('axios');

axios.get('https://api.phantommovies.com/3/movies/latest?accessToken=YourAPIKey')
  .then(response => {
    // Handle the response data
    const movies = response.data;
    console.log('Movies:', movies);
  })
  .catch(error => {
    // Handle the error
    console.error('Error:', error.message);
  });
```

{% endtab %}
{% endtabs %}

### SDK Usage

Get Latest Movies using our official library, `node`:

{% tabs %}
{% tab title="getLatestMovies()" %}

```javascript
API.getLatestMovies().then((res) => {
	console.log(res);
});
```

{% endtab %}
{% endtabs %}
