Skip to content

macrocosm-os/sn13-data-universe-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sn13-data-universe-api-examples

Macrocosmos API & SDK Usage examples for SN13 Data Universe

Setup

  • Grab your API key from Account Settings > Api Keys
  • First 5$ of credits is on us, when you register
  • Put this into your environment or a .env file

Install the SDK

Python

The official python sdk:

pip install macrocosmos

TypeScript

It's also available for typescript:

npm install macrocosmos

Examples

You can find examples under the examples/ directory of this repository.

Feel free to copy/clone them and use, or, get inspired by them and move on as you wish.

Right now, the examples contain sample code to use:

  • The Real Time OnDemand API: pulling up to 1000 unique tweets per datetime (up to minute precision) matching your filters (usernames, keywords, hashtags, etc), including impression data (likes, retweets, etc)

  • The Async Offline "Jobs" (or "Gravity Jobs"), which is identical to the jobs creation UI on the constellation platform, where you can pull massive amounts of data, after waiting for a couple of hours for the scraping to finish.

Data Sources

Currently, we support the following sources:

  • X
  • Reddit
  • YouTube (Beta)

and there are plans to expand this list to also include real time web search and others

Sample Data

If you do not want to mess with the SDK but only want to see how your data will look if you download parquet files (through UI or SDK), check the examples/sample_data directory.

LLM Assist

We also provide a LLM.md file that contains vibe coding instructions if you wish to use a co-pilot for this.

About

Macrocosmos API & SDK Usage examples for SN13 Data Universe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published