@nangohq/server

Nango's runtime.


Keywords
api, api-rest, elt, etl, etl-job, infrastructure, json, json-api, native-integrations, open-source, rest-api, sync-api
License
FSFULLR
Install
npm install @nangohq/server@0.1.13

Documentation

Nango Logo

The easiest way to sync data from external APIs

Nango continuously syncs data from any API endpoint to your local database and keeps it fresh for you.


Explore the docs »

Examples · Report Bug · Community Slack

 Can you show me an example?

In your code you write:

Nango.sync('https://api.hubspot.com/crm/v3/contacts', ...); // Starts syncing contacts forever!

Nango then takes care of:

  • Pagination & full first sync
  • Periodic refresh with incremental syncs
  • Deduplication of records & upserts of changed data
  • Detecting schema changes & alert you
  • Automatic retries & rate-limit handling
  • Making sure your sync is robust, so you never again have to worry about stuck/stale syncs or manual restarts

🧑‍💻 Cool, what can I build with it?

  • Teams in SaaS companies use Nango to build native in-app integrations related to CRM contacts, payment transactions, HRIS employees, etc.
  • Some automate their personal lives with Nango by syncing bank transactions or saved cooking recipes for further processing
  • Nango can help you quickly build proof of concepts (which are easy to make production-grade) for hackathon projects, internal evaluations or to test the technical feasibility of your next big idea

🚀 Interesting, how can I try it?

Let's setup your first Sync in 3 minutes!

It will pull the full list of Pokémons to a local Postgres database (and keep it in sync, they love to evolve!).

Clone the repo and start Nango locally...

git clone https://github.com/NangoHQ/nango.git
cd nango && docker compose up

...and create a Sync with a simple CURL command:

curl --request POST \
    --url http://localhost:3003/v1/syncs \
    --header "Content-type: application/json" \
    --data '{"url": "https://pokeapi.co/api/v2/pokemon", "response_path": "results", "paging_url_path":"next"}'

That's all it takes! You can check out the list of all Pokémons in your local database (password is nango).

In practice, you probably want to use one of our native SDKs to interact with Nango's API (see docs), e.g. for Node.JS:

import { Nango } from '@nangohq/node-client';

let config = {
    response_path: 'results', // The path to the Pokémons objects in the response.
    paging_url_path: 'next' // The path to the next page's url in the response.
};

await Nango.sync('https://pokeapi.co/api/v2/pokemon', config);

🔍 Neat, I would like to learn more

  Follow our development by starring us here on GitHub