title: How to Fix Youtube Data API v3 Required Parameter: part in Axios request and React.js
body: <p>I'm trying to run some queries with the Youtube Data API v3 which should return some videos from the Youtube API but I get an error of "Required parameter: part"</p>
  
  <p>I have tried making the same request (GET) on Postman with same key value pairs and it works just fine in Postman but not inside of my React and Axios app where it spews this error:</p>
  
  <pre><code>{error: {errors: [,…], code: 400, message: "Required parameter: part"}}
  error: {errors: [,…], code: 400, message: "Required parameter: part"}
  code: 400
  errors: [,…]
  0: {domain: "global", reason: "required", message: "Required parameter: part", locationType: "parameter",…}
  domain: "global"
  location: "part"
  locationType: "parameter"
  message: "Required parameter: part"
  reason: "required"
  message: "Required parameter: part"
  </code></pre>
  
  <pre><code>
  import axios from 'axios';
  
  const KEY = 'AIzaSyAL9jCDWvRD2G5nUgBrLEgEhZTQsRvzt80';
  
  export default axios.create({
    baseURL: 'https://www.googleapis.com/youtube/v3',
    params: {
      part: 'snippet',
      maxResults: 5,
      key: KEY
    }
  });
  
  </code></pre>
  
  <p>and my App component:</p>
  
  <pre><code>
  import React from 'react';
  import SearchBar from './SearchBar';
  import youtube from '../components/apis/youtube';
  
  class App extends React.Component {
  
    onTermSubmit = (term) =&gt; {
      youtube.get('/search', {
        params: {
          q: term
        }
      });
    }
    render() {
      return (
        &lt;div className="ui container"&gt;
          &lt;SearchBar onFormSubmit={this.onTermSubmit} /&gt;
        &lt;/div&gt;
      )
    }
  }
  
  export default App;
  
  </code></pre>