Skip to content

arneesh/nango

 
 

Repository files navigation

Nango Logo

Sync external APIs to your DB, fast.

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


Explore the docs »

Examples · Report Bug · Community Slack

⭐ Nango at a glance

Nango continuously syncs data from any API endpoint (that returns JSON) to your database.

Add Syncs to Nango with 1 line of code in your application:

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

Nango then takes care of:

  • Pagination & full first sync
  • Periodic refresh with incremental syncs
  • Deduplication of records & upserts of changed data
  • Automatic schema mapping from JSON to table/SQL schema
  • 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

🧑‍💻 Example use cases

Nango is API agnostic: It works with any API endpoint that returns JSON (you just need to give it a few details about the endpoint).

Whilst Nango supports millions of APIs, here are some of the most popular ones:

  • CRMs such as HubSpot, Salesforce, Pipedrive, Zoho CRM, Zendesk Sell etc.
  • Accounting systems such as Quickbooks, Xero, Netsuite, Zoho Books, Freshbooks etc.
  • Cloud providers such as AWS, GCP, Azure, DigitalOcean, Fly.io, Heroku etc.
  • Productivity tools such as Gmail, Google Calendar, Slack, Outlook 365, Zoom, Google Drive etc.
  • Project Management tools such as Airtable, Asana, Monday.com, ClickUp etc.
  • Dev tools such as Github, Gitlab, JIRA, Trello, Figma etc.
  • ...any API endpoint that returns JSON

The docs have more examples of Nango configurations for different APIs and endpoints.

🚀 Quickstart

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", "mapped_table":"pokemons", "frequency":"1 minute"}'

That's it! You can check out the list of all Pokémons in your local db (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', // For finding records in the API response.
    paging_url_path: 'next', // For finding pagination data in responses.
    mapped_table: 'pokemons', // Customize the name of the destination DB table.
    frequency: '1 minute' // How often the data is refreshed from the external API.
};

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

🔍 Learn more

⭐  Follow our development by starring us here on GitHub ⭐

🔑 The 3rd party API needs OAuth to authenticate?

Nango has built-in support for OAuth through our sister project Pizzly, which makes it fast & flexible to get an OAuth token for any API.

If the API your are working with needs OAuth to connect and you have not implemented it yet we recommend you take a look at Pizzly: It handles all the OAuth flow & access token refresh for you, is easy to try and a small, self-contained container in production.

Pizzly is integrated into Nango. If you use Pizzly for OAuth Nango will automatically have access to the latest access token and use it for its syncs.

About

Sync external APIs to your DB, fast.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 84.9%
  • JavaScript 11.8%
  • Shell 2.3%
  • Dockerfile 1.0%