Step 2: Specify API Details
In this field you will enter the
GET request URL. A
GET request is used to request data from an API.
For example, to retrieve videos from YouTube the
GET URL for the YouTube API is
You can usually find the
GET URL from the developer documentation. For YouTube, we found that information here: https://developers.google.com/youtube/v3/docs/search/list
Most APIs require authentication in order to access their data. We support three authentication methods:
- Bearer Token
- API Key
- Basic Authentication
You will select the authentication method that is supported by the API you are trying to pull data from. Once you select the relevant option you will see the additional fields needed to configure that authentication method. For example, if you select API Key you will enter a name for the key and then your alphanumeric API key.
- Log into the .
- Create a new project by clicking Create New Project or by clicking on the name of the existing project you have open and clicking NEW PROJECT.
- Once you’re in your new project, click + ENABLE APIS AND SERVICES.
- In the API library, navigate to YouTube Data API v3.
- Click ENABLE.
- Then click CREATE CREDENTIALS and select the relevant settings.
- You will then see a page display with your API key.
You can create a sample call by entering https://www.googleapis.com/youtube/v3/videos?key=YOUR_API_KEY into your browser.
This is where you enter specific query parameters that you need to make a successful call. You can add any number of key, value pairs that we will append to your GET request as query parameters.
For YouTube this will include the following:
- part - this parameter is required for the Search endpoint and must be set to
snippet. This is discussed in the YouTube API documentation under “Parameters” .
- type - this parameter specifies the resource type we would like to filter the results to. For our example, we will set this to
videoto make sure our response only includes information about video resources.
- maxResults - this parameter specifies the number of videos you want returned per page. It is optional and will default to 5 if not specified, but let’s set it to 50. This way our preview data table in later steps will include 50 records instead of 5 (since we only show one response at a time in the preview table!)
- channelId - this parameter specifies the channel we would like to filter the results to. In the case of this example, the YouTube Channel ID for the Yext YouTube channel is
UCBGyMZqAKM1FDAAEOR3s8Ag. This can also be located in the URL for the YouTube channel:
This is where you enter specific HTTP request headers that you need to make a successful call. You can add any number of key, value pairs that we will set as headers in your GET request.
For the YouTube Connector example, we actually do not need to set any specific Headers so we will skip this step and leave it blank!
Most API List endpoints support a pagination, meaning they will return the data you requested in multiple pages or responses. The API Documentation will typically let you know which pagination method the API uses and how you can fetch the additional pages.
We support four pagination methods:
- Cursor Pagination
- Page-Based Pagination
- Link Header Pagination
- Offset Pagination
When multiple pages exist, the
nextPageToken property will be included in the API response and includes a token that lets us know that another page of results exists. This is called the cursor. We will set
nextPageToken in the “Cursor” field so that we know to look for the cursor in the
nextPageToken property of each response from the YouTube API.
Sometimes the cursor is contained in the response header, but in this case, it is contained in the response body so we will set the “Detect Cursor In” field to
A cursor could be one of the following types: a token, a relative URL or a full URL. If the cursor is a token, it will be passed in the next API request using a query parameter so we must also know the parameter’s key (the “Page Key”). In this case, the YouTube API cursor is a token, and the key used to send that token in the next request is
pageToken. If the cursor is a full URL or relative URL, you do not need to specify a Page Key!
Lastly, you can optionally specify a Max Page Count. In this example, we want to fetch all of the videos from the Yext channel, so we will leave this blank.
Next you need to specify if the response will contain one entity or many entities. When you look at the sample response you will be able to see this. If the response contains a list of entities you will need to add the JMESPath Syntax for that entity container so we can identify and pull the nested data for each.
Assuming you filled out all of the details above, you can run a test call by clicking Pull at the top of the page. Then click on the View Raw Response button so you can view all the video data and confirm that your pull request was successful. You can also see that the YouTube API response contains multiple videos, so we will select “Many Entities” as our JSON Type.
As you can see in your Raw Response, video objects are nested under the
items section of the response, so enter
items as the Entity Container.