Skip to content

Commit

Permalink
Merge branch 'master' into update-academy/monetizing-your-actor
Browse files Browse the repository at this point in the history
  • Loading branch information
TC-MO authored Dec 12, 2024
2 parents f4354de + 9f5e44b commit 96e7fc6
Show file tree
Hide file tree
Showing 19 changed files with 184 additions and 455 deletions.
1 change: 1 addition & 0 deletions .redocly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ plugins:
decorators:
apify/legacy-doc-url-decorator: on
apify/client-references-links-decorator: on
apify/code-samples-decorator: on
6 changes: 6 additions & 0 deletions apify-api/openapi/code_samples/javascript/acts_get.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ApifyClient } from 'apify-client';

const apifyClient = new ApifyClient({ token: 'my-token' });
const { items } = await apifyClient.actors().list();

console.log(items);

Check warning on line 6 in apify-api/openapi/code_samples/javascript/acts_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
6 changes: 6 additions & 0 deletions apify-api/openapi/code_samples/javascript/acts_post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ApifyClient } from 'apify-client';

const apifyClient = new ApifyClient({ token: 'my-token' });
const myActor = await apifyClient.actors().create({ name: 'my-actor' });

console.log(myActor);

Check warning on line 6 in apify-api/openapi/code_samples/javascript/acts_post.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
2 changes: 2 additions & 0 deletions apify-api/plugins/apify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const ClientReferencesLinksDecorator = require('./decorators/client-references-links-decorator');
const CodeSamplesDecorator = require('./decorators/code-samples-decorator');
const LegacyDocUrlDecorator = require('./decorators/legacy-doc-url-decorator');

module.exports = {
Expand All @@ -7,6 +8,7 @@ module.exports = {
oas3: {
'legacy-doc-url-decorator': LegacyDocUrlDecorator,
'client-references-links-decorator': ClientReferencesLinksDecorator,
'code-samples-decorator': CodeSamplesDecorator,
},
},
};
59 changes: 59 additions & 0 deletions apify-api/plugins/decorators/code-samples-decorator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const { existsSync } = require('fs');
const path = require('path');

const X_CODE_SAMPLES_PROPERTY = 'x-codeSamples';

const LANGUAGES = [
{ lang: 'JavaScript', label: 'JS client' },
];

/**
* This decorator adds the x-codeSamples property to the schema object if a file with the operationId exists in the
* code samples directory.
* This helps us add the samples in a consistent way and find out which operations are missing a sample.
*
* The added sample link will look like this:
* x-codeSamples:
* - lang: JavaScript
* label: JS client
* source:
* $ref: ../../code_samples/js/acts_post.js
*/
function CodeSamplesDecorator(target) {
if (!target.operationId) return;

const codeSamples = [];

for (const { lang, label } of LANGUAGES) {
const codeSamplePath = path.join(__dirname, `../../openapi/code_samples/${lang.toLowerCase()}/${target.operationId}.js`);

if (!existsSync(codeSamplePath)) {
// Just use this console log in development to see which operations are missing a code sample.
// console.log(`Missing code sample for operation ${target.operationId}`);
return;
}

codeSamples.push({
lang,
label,
source: {
$ref: codeSamplePath,
},
});
}

if (codeSamples.length) {
target[X_CODE_SAMPLES_PROPERTY] = codeSamples;
}
}

module.exports = () => ({
// Redocly is using a visitor pattern. What the following code does is that whenever the traverser leaves a node of
// type Tag or Operation, it executes CodeSamplesDecorator on it.
Tag: {
leave: CodeSamplesDecorator,
},
Operation: {
leave: CodeSamplesDecorator,
},
});
2 changes: 1 addition & 1 deletion apify-docs-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apify/docs-theme",
"version": "1.0.145",
"version": "1.0.146",
"description": "",
"main": "./src/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion apify-docs-theme/src/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ html[data-theme='dark'] {
--ifm-footer-link-color: #6b6e80;
--max-layout-width: 1440px;

--ifm-code-background: #f6f8fa;
--ifm-code-background: var(--ifm-pre-background);

--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);

Expand Down
97 changes: 0 additions & 97 deletions sources/academy/platform/get_most_of_actors/actor_readme.md

This file was deleted.

111 changes: 0 additions & 111 deletions sources/academy/platform/get_most_of_actors/guidelines_for_writing.md

This file was deleted.

19 changes: 9 additions & 10 deletions sources/academy/platform/get_most_of_actors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ category: apify platform
slug: /get-most-of-actors
---

# Apify Store {#apify-store}

**Learn how to optimize your public Actors on Apify Store and monetize them by renting your Actor to other platform users.**

---

[Apify Store](https://apify.com/store) is home to hundreds of public Actors available to the Apify community. Anyone is welcome to [publish Actors](/platform/actors/publishing) in the store, and you can even [monetize your Actors](https://apify.com/partners/actor-developers).

In this section, we will go over some of the practical steps you can take to ensure the high quality of your public Actors. You will learn:
The [Apify Store](https://apify.com/store) is a marketplace featuring thousands of ready-made automation tools called Actors. As a developer, you can publish your own Actors and generate revenue through our [monetization program](https://apify.com/partners/actor-developers).

1. Actor naming and README best practices.
2. How to monetize your Actor.
3. Tips and tricks to attract more users to your Actor's page.
To help you succeed, we've created a comprehensive Marketing Playbook. This resource shows you how to:

## Next up {#next}
- Optimize your Actor's visibility in the store
- Create compelling descriptions and documentation
- Build your developer brand
- Promote your work to potential customers
- Analyze performance metrics
- Engage with the Apify community

Without further ado, let's jump [right into the next lesson](./naming_your_actor.md)!
Ready to grow your presence on the platform? Check out our [Marketing Playbook](https://apify.notion.site/3fdc9fd4c8164649a2024c9ca7a2d0da?v=6d262c0b026d49bfa45771cd71f8c9ab) and learn how to [publish your first Actor](/platform/actors/publishing).
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ slug: /get-most-of-actors/monetizing-your-actor

---

When you publish you publish your Actor on the Apify platform, you have the option to make it a _Paid Actor_ and earn revenue from users who benefit from your tool. You can choose between two pricing models:
When you publish your Actor on the Apify platform, you have the option to make it a _Paid Actor_ and earn revenue from users who benefit from your tool. You can choose between two pricing models:

- Rental
- Pay-per-result
Expand Down Expand Up @@ -71,7 +71,7 @@ For example, if you host 50GB of data for 30 days:
This means that storing 50 GB of data for 30 days results in 36,000 GB-hours.
:::

nread more about Actors in the STore and different pricing models from the perspective of your users in the [Store documentation](https://docs.apify.com/platform/actors/running/actors-in-store).
Read more about Actors in the Store and different pricing models from the perspective of your users in the [Store documentation](https://docs.apify.com/platform/actors/running/actors-in-store).

<details>
<summary>Example - pay-per-result pricing model</summary>
Expand Down Expand Up @@ -108,6 +108,7 @@ Be aware that you can change monetization setting of each Actor only once per mo

:::


## Payouts & analytics

Payout invoices are generated automatically on the 14th of each month. Review your invoice in the Settings > Payout section within one week. If not approved by the 20th, the system will auto-approve on the 21st.
Expand All @@ -132,4 +133,7 @@ Create SEO-optimized descriptions and README files to improve search engine visi
- Publish articles about your Actor on relevant websites
- Consider creating a product showcase on platforms like Product hunt


Remember to tag Apify in your social media posts for additional exposure. Effective promotion can significantly impact your Actor's success, differentiating between those with many paid users and those with few to none.

Learn more about promoting your Actor from [Apify's Marketing Playbook](https://apify.notion.site/3fdc9fd4c8164649a2024c9ca7a2d0da?v=6d262c0b026d49bfa45771cd71f8c9ab).
Loading

0 comments on commit 96e7fc6

Please sign in to comment.