Get synced records
curl --request GET \
--url https://api.nango.dev/records \
--header 'Authorization: Bearer <token>' \
--header 'Connection-Id: <connection-id>' \
--header 'Provider-Config-Key: <provider-config-key>'import requests
url = "https://api.nango.dev/records"
headers = {
"Connection-Id": "<connection-id>",
"Provider-Config-Key": "<provider-config-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Connection-Id': '<connection-id>',
'Provider-Config-Key': '<provider-config-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.nango.dev/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nango.dev/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connection-Id: <connection-id>",
"Provider-Config-Key: <provider-config-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nango.dev/records"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Connection-Id", "<connection-id>")
req.Header.Add("Provider-Config-Key", "<provider-config-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nango.dev/records")
.header("Connection-Id", "<connection-id>")
.header("Provider-Config-Key", "<provider-config-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nango.dev/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Connection-Id"] = '<connection-id>'
request["Provider-Config-Key"] = '<provider-config-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"your-properties": "Your synced data, in the schema you (or Nango) defined in script",
"_nango_metadata": {
"deleted_at": "2023-11-07T05:31:56Z",
"last_action": "ADDED",
"first_seen_at": "2023-09-18T15:20:35.941305+00:00",
"last_modified_at": "2023-09-18T15:20:35.941305+00:00",
"cursor": "MjAyNC0wMy0wNFQwNjo1OTo1MS40NzE0NDEtMDU6MDB8fDE1Y2NjODA1LTY0ZDUtNDk0MC1hN2UwLTQ1ZmM3MDQ5OTdhMQ==",
"pruned_at": "2023-11-07T05:31:56Z"
}
}
],
"next_cursor": "MjAyMy0xMS0xN1QxMTo0NzoxNC40NDcrMDI6MDB8fDAzZTA1NzIxLWNiZmQtNGYxNS1iYTNhLWFlNjM2Y2MwNmEw=="
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}Syncs
Get records
Returns data synced with Nango Sync
GET
/
records
Get synced records
curl --request GET \
--url https://api.nango.dev/records \
--header 'Authorization: Bearer <token>' \
--header 'Connection-Id: <connection-id>' \
--header 'Provider-Config-Key: <provider-config-key>'import requests
url = "https://api.nango.dev/records"
headers = {
"Connection-Id": "<connection-id>",
"Provider-Config-Key": "<provider-config-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Connection-Id': '<connection-id>',
'Provider-Config-Key': '<provider-config-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.nango.dev/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nango.dev/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connection-Id: <connection-id>",
"Provider-Config-Key: <provider-config-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nango.dev/records"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Connection-Id", "<connection-id>")
req.Header.Add("Provider-Config-Key", "<provider-config-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nango.dev/records")
.header("Connection-Id", "<connection-id>")
.header("Provider-Config-Key", "<provider-config-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nango.dev/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Connection-Id"] = '<connection-id>'
request["Provider-Config-Key"] = '<provider-config-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"your-properties": "Your synced data, in the schema you (or Nango) defined in script",
"_nango_metadata": {
"deleted_at": "2023-11-07T05:31:56Z",
"last_action": "ADDED",
"first_seen_at": "2023-09-18T15:20:35.941305+00:00",
"last_modified_at": "2023-09-18T15:20:35.941305+00:00",
"cursor": "MjAyNC0wMy0wNFQwNjo1OTo1MS40NzE0NDEtMDU6MDB8fDE1Y2NjODA1LTY0ZDUtNDk0MC1hN2UwLTQ1ZmM3MDQ5OTdhMQ==",
"pruned_at": "2023-11-07T05:31:56Z"
}
}
],
"next_cursor": "MjAyMy0xMS0xN1QxMTo0NzoxNC40NDcrMDI6MDB8fDAzZTA1NzIxLWNiZmQtNGYxNS1iYTNhLWFlNjM2Y2MwNmEw=="
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}Requires an API key with the
environment:records:read scope. Learn more about API key scopes.Receive webhooks on data updates
Receive webhooks from Nango when new records are available. Follow the sync functions section.Data availability: Records are subject to Nango’s data retention policies. Records not updated for 30 days will have their payload pruned (only metadata remains). Records from syncs not executed for 60 days are permanently deleted. Fetch and store records promptly in your own system.
Response
This endpoint returns a list of records, ordered by modification date ascending. If some records are updated while you paginate through this endpoint, you might see these records multiple times.
A response may contain fewer records than
limit when records have a large size. Always check next_cursor and continue paginating until it is null.Default behavior
By default this returns an array of objects in the data model that you queried with some metadata about each record.{
records:
[
{
id: 123,
..., // Fields as specified in the model you queried
_nango_metadata: {
deleted_at: null,
last_action: 'ADDED',
first_seen_at: '2023-09-18T15:20:35.941305+00:00',
last_modified_at: '2023-09-18T15:20:35.941305+00:00',
cursor: 'MjAyNC0wMy0wNFQwNjo1OTo1MS40NzE0NDEtMDU6MDB8fDE1Y2NjODA1LTY0ZDUtNDk0MC1hN2UwLTQ1ZmM3MDQ5OTdhMQ=='
}
},
...
],
next_cursor: "MjAyMy0xMS0xN1QxMTo0NzoxNC40NDcrMDI6MDB8fDAzZTA1NzIxLWNiZmQtNGYxNS1iYTNhLWFlNjM2Y2MwNmEw=="
}
Authorizations
Headers
Query Parameters
A marker used to fetch records modified after a specific point in time. If not provided, all records are returned. Each record includes a cursor value found in _nango_metadata.cursor. Save the cursor from the last record retrieved to track your sync progress. Use the cursor parameter together with the limit parameter to paginate through records. The cursor is more precise than modified_after, as it can differentiate between records with the same modification timestamp.
Was this page helpful?