# Cults

> Search the Cults 3D-printing marketplace with GraphQL - designs, creators, prices, your own designs and sales - on your Cults username and API key.

Lets an agent read the [Cults](https://cults3d.com) 3D-printing model marketplace
through its official GraphQL API: search designs, look up creators and their
latest work, read prices and images, and see your own designs, sales and
printlists. With your confirmation it can also change data on Cults through a
GraphQL mutation. FlyMy.AI connects to Cults directly with your own username and
API key.

## What it can do

| Method | What it does |
| --- | --- |
| `cults_graph_ql_post` | Read Cults with one GraphQL query: `creationsSearchBatch(query, limit, offset)`, `creationsBatch`, `creation(slug)`, `user(nick)`, `categories`, `licenses` and `myself` (your user, designs, sales, printlists). Queries only; 3D files are not exposed. |
| `cults_graph_ql_mutation` | Change data on Cults with one GraphQL mutation (`createCreation`, `updateCreation`, `createDiscount` and the rest of the schema). A write: the agent asks you first and never repeats it automatically. |
| `cults_share_on_create_fr` | Build the "publish to Cults" link for a 3D file. Nothing is sent to Cults: a signed-in Cults user who opens the link publishes the file. Cults must approve your site name (`origin`) first. |

An agent or a saved call that still uses the older name `CULTS_GRAPH_QL_POST`
keeps working: it runs `cults_graph_ql_post`.

## How to get credentials

1. Sign in to [Cults](https://cults3d.com).
2. Open the API keys page: [cults3d.com/en/api/keys](https://cults3d.com/en/api/keys)
   and create a key.
3. Note your Cults username (the nick in your profile URL).
4. In FlyMy.AI, add **Cults** to your tools and paste the key and the username.

## Fields to fill in FlyMy.AI

| FlyMy.AI field | Where it comes from |
| --- | --- |
| API Key (`generic_api_key`) | The key you created on [cults3d.com/en/api/keys](https://cults3d.com/en/api/keys). |
| Username (`generic_id`) | Your Cults username. |

## Try it

> Search Cults for the most downloaded priced "dragon figure" designs and list
> the top 10 with their creators, prices and links.

> Show my Cults designs and how many sales each one had.

## Troubleshooting

- **"Cults is rate limiting these calls (HTTP 429)"** - Cults answers about 60
  requests in a 30-second window. Wait the time named in the error, then send
  lighter queries: fewer aliased fields per document, smaller `limit` values,
  only the fields you need.
- **"Cults' security system blocked the network address"** - Cults blocks an
  address for about 4 hours after automated bursts, and every new request renews
  the block. Stop calling Cults until it lifts; the key is not the cause and
  reconnecting does not help.
- **HTTP 401** - the username or the API key is wrong. Create a new key on the
  API keys page and update the connection.
- **"reads only, and this document holds a mutation"** - send the mutation with
  `cults_graph_ql_mutation` instead.

## Links

- [Cults API](https://cults3d.com/en/api)
- [Cults GraphQL endpoint](https://cults3d.com/en/pages/graphql)
- [Query and mutation examples](https://gist.github.com/sunny/07db54478ac030bd277c19cfe734648b)
