# Trending Movies

## Trending Movies

## Get Trending Movies

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

Get all Trending 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/trending -H "Authorization: Bearer YourAPIKey"
```

{% endtab %}

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

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

axios.get('https://api.phantommovies.com/3/movies/trending?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 %}

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

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

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.phantommovies.com/api-reference/movies/trending-movies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
