[{"data":1,"prerenderedAt":101},["ShallowReactive",2],{"search-api":3},[4,11,22,31,40,52,61,74,84,92],{"id":5,"path":6,"dir":7,"title":8,"description":7,"keywords":9,"body":10},"content:0.index.md","/","","Home",[],"     FreeStuff's Data, programmatically.   Real-time infos about free games, ingame conent, discounts and everything else you're loving about   FreeStuff .      Full access  to all channels including premium exclusives  Both   Push  and   Pull  solutions for obtaining real-time data, whatever fits you best  Batteries included   client libraries  for super easy integration  Search through historic data",{"id":12,"path":13,"dir":14,"title":15,"description":16,"keywords":17,"body":21},"content:1.introduction:1.welcome.md","/introduction/welcome","introduction","Welcome","Welcome to the FreeStuff Developer Documentation.",[18,19,20],"Who is this API for?","Pricing","Contact","  Welcome  Welcome to the FreeStuff Developer Documentation.  FreeStuff's API will provide you with high quality and real time data of free games, free software, discounts, game passes, and more. You can get everything you're used to from our official Bots in a machine readable format and then some extra info on top that we don't use in our official bots.  For more information on FreeStuff check out our website at   https://freestuffbot.xyz/  Who is this API for?  The API is for everyone who would like to build their own bots or websites using data about free games.  If you just want to get informed about free games and have no intention to build your own product, you're probably better suited using one of our official bots and don't need to use the API. More info on our website linked above.  Pricing  Access to the deprecated v1 API is no longer obtainable. If you are looking for the old documentation, see our   FreeStuff API v1 Docs  For pricing in v2 refer to the   Pricing Overview  Contact  In case you have questions either before signup or during development and useage of our API, feel free to contact us on Discord:   https://freestuffbot.xyz/discord",{"id":23,"path":24,"dir":14,"title":25,"description":7,"keywords":26,"body":30},"content:1.introduction:2.getting-started.md","/introduction/getting-started","Getting Started",[27,28,29],"Terms and conditions","Your application and credentials","Libraries","  Getting Started  Terms and conditions  Please be aware that using FreeStuff's API comes with certain terms and conditions    FreeStuff Developer Terms of Service  FreeStuff global   Privacy Policy  FreeStuff global   Terms of Service  If you chose a paid plan, our   Refund Policy  Your application and credentials  To interact with any part of the FreeStuff API you need to create an application on   https://dashboard.freestuffbot.xyz/ .\nOnce signed in you should find a button to view FreeStuff API settings on your home page.\nGo to Plans & Billing, then sign up for the free tier.  You can find your REST API key and your app's public key under \"my application\".  Libraries  There are libraries to interact with the API available for the following languages / ecosystems. Using such an API wrapper is the easiest way to interact with FreeStuff's API and we highly recommend using an existing API wrapper if one is available that fits your setup. Please refer to the libary's documentation for usage.    Node / Bun (Official)",{"id":32,"path":33,"dir":34,"title":35,"description":36,"keywords":37,"body":39},"content:2.api-v2:1.introduction.md","/api-v2/introduction","api-v2","Introduction","Welcome to FreeStuff's second iteration on our api. Api v2 can do everything v1 could, but better.",[38,19],"What's new","  Introduction  Welcome to FreeStuff's second iteration on our api. Api v2 can do everything v1 could, but better.  What's new   Simplified the interface by removing internal (\"partner\") endpoints  Streamlined the data obtaining process  Built on web standards. See   Standard Webhooks ,   Problem JSON , and more  Introduction of compatibility dates for seamless api versioning  Introduction of a free tier  Pricing  FreeStuff's api comes in two basic tiers.      Free Tier  Full Tier    Price  $0  $2.99/mo¹   Channels  100% Discount, Free Weekend, DLCs & More  All Channels, including Prime Gaming & Game Pass   Data  Partial data, no metadata, reduced assets  Full data, see documentation for more details   Content Interface  Webhooks only  Webhooks + REST Api   Commercial use  Prohibited²  Prohibited²  ¹ This price is without guarantee. For the actual binding price please check your dashboard.  ² There is an additional commercial tier for if you want to use FreeStuff's API or Data in a commercial setting. Please contact us for more information.",{"id":41,"path":42,"dir":34,"title":43,"description":44,"keywords":45,"body":51},"content:2.api-v2:2.concepts.md","/api-v2/concepts","Concepts","FreeStuff's API is in large parts merely a read only gateway to our Content Management System (CMS). In order to understand all the things the API exposes you need to understand how our CMS is constructed.",[46,47,48,49,50],"Products","Announcements","Channels","Content Summary","Compatibility Dates","  Concepts  FreeStuff's API is in large parts merely a read only gateway to our Content Management System (CMS). In order to understand all the things the API exposes you need to understand how our CMS is constructed.  Don't worry, it's not complex.  Products  At the core of everything are products. A product is a free game, an ingame item in gamepass, or anything else the bot sends notifications for.  Each product is part of an   Announcement  and has both a   Channel  as it's   type  and a   ProductKind  as it's   kind .  Additionally a product has some basic properties like a title, assets (logos, images), and description, it has pricing information about old and new prices in multiple currencies, as well as metadata in various forms. See the corresponding Data Model for a full list of properties.  Each product has a kind as described earlier. This value describes what kind of product it is. Usually it's a   game , but others like   dlc  or   loot  for game pass or prime gaming are also possible. FreeStuff also has more types like   art ,   ost , or   other  which are currently unused.   The Data Models below show compatibility date   2025-03-01 . Newer versions might differ in details.                Announcements  When we publish products to send to our official bots on Discord, Telegram and potentially others, as well as our API users like you, we're not publishing products individually. Instead we often bundle multiple products together because they have semantic relevance and/or because it allows us to more effectively distribute the products to our hundreds of thousands of subscribers.  An announcement describes such a collection of products. Every time we publish something a new announcement is created, even if it's just for a single product.  Each announcement goes into a   Channel . All products belonging to that announcement also have the same   Channel  set as their   type .    Channels  FreeStuff supports different kinds of free games. There's games that have a temporary 100% discount, games that are available to play for a limited amount of time without you owning them, there's game pass and prime gaming, there's DLCs and additional content, etc.  Each of those is a channel. You might only be interested in a single one of those channels or you might be interested in multiple or all of them.  More channels may be added in the future but here is our current list:   Content Summary  FreeStuff has different Channels with different purposes.  A Channel is used to publish Announcements.  An Announcement is a collection of Products, all with the same type but of potentially different kinds.  Compatibility Dates   If you are using a client library you do not need to worry about compatibility dates. Your library will handle all of this for you and use a version that it is compatible with.  API v2 introduces compatibility dates. These act as versioning for the format of the data you can access through FreeStuff's API.   In simpler terms: Requesting a product through different compatibility dates will always return the same product but the data format might change.\nFor example, an older version might not include the product's description, while another version might change some field's name from \"title\" to \"product_name\".  We made this decision to allow our data model to evolve and API users to make use of this without introducing a new API version every time.  REST endpoints and the overarching structure of webhook deliveries will never have any breaking changes under v2 but compatibility dates allow our datamodel to have such.  A compatibility date always follows the format   YYYY-MM-DD  and should generally be set to the date you start working on your API integration.\nAvoid picking dates in the past as documentation might not reflect older data models.\nWhile theoretically possible,   never  pick compatibilty dates from the future as this might deliver data in a potentially unknown format, which is usually not what you want as breaking changes can be introduced any moment this way.  While the REST API and Webhooks handle setting/configuring the compatibility date differently, the data retrieved will always be in the same format for the same compatibility date, regardless of the interface it is accessed through.",{"id":53,"path":54,"dir":34,"title":55,"description":56,"keywords":57,"body":60},"content:2.api-v2:3.rest-api.md","/api-v2/rest-api","Rest API","All endpoints are available on https://api.freestuffbot.xyz/v2",[58,59],"Auth","List of endpoints","  Rest API  All endpoints are available on   https://api.freestuffbot.xyz/v2  Auth  You should already have an API key. If not please check out the   Getting Started  page.  Your API key should be present in the   Authorization  header on every request to the API.\nPrefix your API key with the word   Bearer .   Assuming your API key is \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", this is how your header should look like:   Authorization: Bearer ABCDEFGHIJKLMNOPQRSTUVWXYZ  List of endpoints  Endpoints are grouped into \"Static\" and \"Content\".\nIf you are on the free tier you only have access to endpoints in the \"static\" group.\nUpgrade to get access to content endpoints.  Static   All schemas returned by endpoints in this category are defined following the   https://json-schema.org/  specification.       Content   The endpoints in this category are only available to users in the \"full\" tier or above.  ",{"id":62,"path":63,"dir":34,"title":64,"description":65,"keywords":66,"body":73},"content:2.api-v2:4.webhooks.md","/api-v2/webhooks","Webhooks","FreeStuff's webhooks are POST requests. Each request is refered to as a 'Message' below. The messages are delivered to the url you have configured on your dashboard. All data is in the shape of the compatibility date defined on the dashboard.",[67,68,69,70,71,72],"Message Payload","Message Headers","Verifying the request","Resends","Responding to webhook requests","Event List","  Webhooks  FreeStuff's webhooks are   POST  requests. Each request is refered to as a 'Message' below. The messages are delivered to the url you have configured on your dashboard. All data is in the shape of the compatibility date defined on the dashboard.  Message Payload  The message payload (http body) follows the   Standard Webhooks Spec  and looks as follows:     {\n     \"type\": \"fsb:event:announcement_created\",\n     \"timestamp\": \"2022-11-03T20:26:10.344522Z\",\n     \"data\": {\n       // ...\n     }\n   }\n  See   Event List  for a list of events.  Message Headers  The webhook request will have the following headers:    X-Compatibility-Date  - the compatibility date of the content send in the payload's data field   Webhook-Id  - the message id, see   verifying the request   Webhook-Timestamp  - the message send timestamp, see   verifying the request   Webhook-Signature  - the message signature, see   verifying the request  Verifying the request  FreeStuff signs every webhook request as per   Standard Webhooks Spec . While not required, it is highly recommended you check for a valid signature before processing any events received.   You can find your Ed25519 public key on your app page  The content to be verified is   msg_id.timestamp.payload  with msg_id and timestamp being provided as   Webhook-Id  and   Webhook-Timestamp  headers respectively  Make sure to take the raw http body (prior to parsing the JSON content) for the verification   payload  Make sure to store the   msg_id  for a certain amount of time to prevent package duplication and replay attacks  Make sure to ignore requests with an old   Webhook-Timestamp  value\n   Following the spec, we use a custom epoch of   2025-01-01  and a precision of seconds  To calculate the current time multiply the header value by   1000 , then add   1735689600000  Make sure to use the payload body   timestamp  field as the contextual timestamp and use the header only for verification   If you are not using a library to verify the request for you and you are not interested in implementing the verification yourself, we recommend you pick a long and unguessable url for your webhook to prevent abuse.  Resends  FreeStuff attempts to resend failed deliveries as per   Standard Webhooks Spec . You are required to respond with a   2xx  status code after successfully   receiving  the data.   Failure to process the data or perform actions with the data on your end should not yield a non-2xx status code as the message was delivered successfully  While the Standard Webhooks Spec suggests a schedule for resends, FreeStuff may use a different timing for when resends are scheduled  If you fail to receive multiple events in a row (no 2xx codes returned in multiple consecutive events spanning multiple days) your webhook will be considered dead and will be removed from our system. This will not revoke your api access entirely but you will have to configure your webhook again.  Responding to webhook requests   A code of   204 No Content  with an empty body is prefered as the server will ignore your response body anyway  If for any reason you cannot send a   204 , any other   2xx  code is accepted as well  You may send a   X-Set-Compatibility-Date  header with a compatibility date on your response\n   If the value is a valid compatibility date the setting in your app will be overwritten to use this compatibility date for all subsequent deliveries  The new compatibility date already applies to resends so you can respond with a   4xx  code if you read an unexpected   X-Compatibility-Date  request header and force FreeStuff to deliver the message again with the correct date  Library authors are encouraged to set this header on every response to the newest compatibility date their library is compatible with, as well as to   4xx  every request with an incompatible   X-Compatibility-Date  request header. This way users can easily install and update your library without manual configuration on the dashboard or even knowing about the compatibility date system  If you respond with a non   2xx  status while having an invalid value for your   X-Set-Compatibility-Date , the message will not be scheduled for a resend as it is assumed you let the request fail because of the compatibility date missmatch while expecting a non-valid date  You may send a   X-Client-Library  header with details about your library\n   Library authors are encouraged to set this header on every response  The format should be   Library Name/version (url to library homepage or git repo)  - e.g.   FreeStuff.py/1.0.2 (https://github.com/my/fake-repo)  Event List  fsb:event:ping  Fired either when the ping button was pressed on your dashboard or periodically to check if your webhook is still operational.  The   data  field will contain the following object:     {\n     \"manual\": boolean // will be true if you manually requested this ping, false otherwise\n   }\n  fsb:event:announcement_created  Fired when a new announcement is published.  The   data  field will contain a single   ResolvedAnnouncement . Check it's   resolvedProducts  field for a list of all new products.   fsb:event:product_updated  Fired when a previously published product is updated.  The   data  field will contain the   full    Product  data, not just the changes.    The Data Models above show compatibility date   2025-03-01 . Newer versions might differ in details.  html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"id":75,"path":76,"dir":77,"title":78,"description":79,"keywords":80,"body":83},"content:3.libraries:1.node.md","/libraries/node","libraries","Node / Bun","Use FreeStuff API in any JavaScript project using our official package.",[81,82],"Install","Usage","  Node / Bun  Use FreeStuff API in any JavaScript project using our official package.  Install      bun   add   freestuff\n     yarn   add   freestuff\n     npm   install   freestuff\n  Usage  See   GitHub  for how to use.  Or   open a PR  to add docs to this page.  html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"id":85,"path":86,"dir":77,"title":87,"description":88,"keywords":89,"body":91},"content:3.libraries:2.go.md","/libraries/go","Go","Use FreeStuff API in any Go project using a community maintained package.",[90],"Freego","  Go  Use FreeStuff API in any Go project using a community maintained package.  Freego  Freego is a comprehensive go library with support for the full API v2, including REST Api and Webhook handling.  Maintained by:   eoussama  GitHub:   https://github.com/eoussama/freego  Go Packages:   https://pkg.go.dev/github.com/eoussama/freego  Install     go   get   github.com/eoussama/freego\n  Usage     package main\n   \n   import (\n       \"context\"\n       \"log\"\n       \"os\"\n       \"os/signal\"\n   \n       \"github.com/eoussama/freego\"\n       \"github.com/eoussama/freego/webhook\"\n   )\n   \n   func main() {\n     // Setting up a webhook receiver\n   \n       verifier, err := webhook.NewVerifier(os.Getenv(\"FREEGO_FREESTUFF_PUBLIC_KEY\"))\n       if err != nil {\n           log.Fatal(err)\n       }\n   \n       handler := webhook.NewHandler(verifier, webhook.Config{\n           OnAnnouncementCreated: func(ctx context.Context, e *webhook.Event, a *freego.ResolvedAnnouncement) error {\n               for _, p := range a.ResolvedProducts {\n                   if p.ShouldIgnore() {\n                       continue\n                   }\n                   url, _ := p.BestURL(freego.URLFlagOpensInBrowser)\n                   log.Printf(\"%s is free on %s: %s\", p.Title, p.Store, url.URL)\n               }\n               return nil\n           },\n           OnProductUpdated: func(ctx context.Context, e *webhook.Event, p *freego.Product) error {\n               log.Printf(\"%s was updated\", p.Title)\n               return nil\n           },\n           OnError: func(ctx context.Context, e *webhook.Event, err error) {\n               log.Print(err)\n           },\n       })\n   \n       ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)\n       defer stop()\n       if err := webhook.ListenAndServe(ctx, \":8080\", \"/webhook\", handler); err != nil {\n           log.Fatal(err)\n       }\n   \n     // Using the REST Api\n   \n     client, err := freego.New(os.Getenv(\"FREEGO_FREESTUFF_API_KEY\"))\n     if err != nil {\n       log.Fatal(err)\n     }\n   \n     ctx := context.Background()\n   \n     // Check the API and the key. Works on every plan.\n     if err := client.Ping(ctx); err != nil {\n       log.Fatal(err)\n     }\n   \n     // List products (full tier). Without Resolve, only partial products are\n     // returned: ID, Kind, Until, Type, Flags and Store.\n     list, err := client.Products(ctx, &freego.ProductsQuery{\n       Type:    freego.ChannelKeep,\n       Resolve: true,\n     })\n     if errors.Is(err, freego.ErrUnavailableForFreeTier) {\n       log.Fatal(\"listing products requires the full tier\")\n     }\n   \n     // Walk every page.\n     it := client.ProductsIter(&freego.ProductsQuery{Resolve: true})\n     for it.Next(ctx) {\n       fmt.Println(it.Product().Title)\n     }\n     if err := it.Err(); err != nil {\n       log.Fatal(err)\n     }\n   \n     // Look up one product.\n     product, err := client.Product(ctx, 123456)\n   }\n  See   GitHub  for the full and up to date documentation.  html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"id":93,"path":94,"dir":77,"title":95,"description":96,"keywords":97,"body":100},"content:3.libraries:3.other.md","/libraries/other","Other Libraries","A list of other libraries not qualifying for their own page.",[98,99],"freestuff-api-go","Made your own library?","  Other Libraries  A list of other libraries not qualifying for their own page.  freestuff-api-go  Unofficial, only for API v1  Features:\n  x  Game List\n  x  Game Details\n   Webhook Event Handler\n   Partner Endpoints  Docs:   https://github.com/jrh3k5/freestuff-api-go#readme  Author:   https://github.com/jrh3k5  Made your own library?  Please reach out! Or if you want to create a PR at   https://github.com/FreeStuffBot/docs  - create a new page with the name of your programming language / runtime. If one already exists, add to that page.",1790880595193]