Learn how to use Airstack by making direct API call without Airstack SDK. In this tutorial, you will learn how to integrate in Node.js. However, this should also work in any other tech stacks.
đ¯ Direct API Call
In this tutorial, you will learn how to start integrating Airstack API by making direct API call without the Airstack SDKs.
While this method is most useful when you already have an app that is using languages not supported by the Airstack SDKs, such as JavaScript/TypeScript and Python, this get starting guide will be using Node.js as an example.
All the concepts here for integrating Airstack GraphQL API should be translatable to any tech stacks you are using.
GraphQL API Library
You can call the Airstack API by using a 3rd party GraphQL API library with the following details:
If you are using Node version 20.6.0+, then you can simply import the environment variable to you Node.js app. Thus, directly proceed to the next step.
If you are using Node version earlier than 20.6.0, then you need to install the dotenv package:
npminstalldotenv
yarnadddotenv
pnpminstalldotenv
and import the package to be able to inject the environment variable to your application:
index.ts
import { config } from"dotenv";config();
index.js
import { config } from"dotenv";config();
Step 3: Call Your Query
Once you have installed one of the 3rd party SDK, you can directly make calls to the Airstack API.
Below you have been provided with Airstack query to fetch the 0x address and Farcaster owned by vitalik.eth:
If you have any questions or need help regarding integrating Airstack using direct API call into your web3 application, please join our Airstack's Telegram group.
More Resources
Learn to build more with Airstack using our tutorials: