πSearch POAPs
Learn how to use Airstack RegEx Filter to search for POAPs that fulfill the given criteria
Airstack provides easy-to-use APIs for enriching POAP applications and for integrating POAP on-chain data indexed directly from both Ethereum and Gnosis.
Using the _regex
operator in PoapEvents
API, now you can search for POAPs easily with any standard regex patterns and build your very own POAP search engine into your application.
Table Of Contents
In this guide you will learn how to use Airstack to:
Keep in mind that you can combine the regex from each of these use cases into your query to build more complex search feature that suits your app use cases.
Pre-requisites
An Airstack account
Basic knowledge of GraphQL
Get Started
JavaScript/TypeScript/Python
If you are using JavaScript/TypeScript or Python, Install the Airstack SDK:
React
Node
Then, add the following snippets to your code:
Other Programming Languages
To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
π€ AI Natural Languageβ
Airstack provides an AI solution for you to build GraphQL queries to fulfill your use case easily. You can find the AI prompt of each query in the demo's caption or title for yourself to try.
Best Practices
Here are some best practices to keep in mind to use the _regex
filter optimally:
Case Insensitivity
If case insensitivity is not necessary, avoid using the case-insensitive flag (i
) in your regex, as it may slow down the query.
If you need case-insensitive search, it is best practice that you use (?i)devcon
pattern instead of other patterns (e.g. [Dd]evcon
) for most optimal response time.
Avoid Wildcard
Structure your regex pattern as specific as possible and avoid using wildcard (.*
) in your regex if possible, as it can lead to more extensive scans and longer response times.
Search All POAPs Starting With Given Words
You can search all POAP events that start with given word by using the PoapEvents
API:
Try Demo
Code
Search All POAPs In Case Insensitive Manner
You can search all POAP events that contain a given word in a case-insensitive manner by using the PoapEvents
API:
When doing case-insensitive search, it is best practice that you use (?i)devcon
pattern instead of others (e.g. [Dd]evcon
).
Try Demo
Code
Search All POAPs That Does Not Contain Given Words
You can search all POAP events that DOES NOT contain a given word in by using the PoapEvents
API:
Try Demo
Code
Developer Support
If you have any questions or need help regarding search POAP events using RegEx, please join our Airstack's Telegram group.
More Resources
Last updated
Was this helpful?