1
$\begingroup$

Is it possible to dynamically embed responses into a blog post?

So the user would see:

There are 390900 plant species in the world.

With pseudo code:

There are #{worlfram(number of plant species)} plant species in the world.

I want to write facts that don't get stale in time, but Wolfram's API doesn't seem to be built around many requests, and I haven't found any embed codings.

Does this require me to spin up a Mathematica server?

$\endgroup$
2
  • $\begingroup$ You don't specify why you think Wolfram Cloud APIs aren't suitable for many requests. I assume it's because of the pricing. The solution to this is to use caching. If the number of plant species changes very rarely, for example, you could cache the number of plant species and only request a new value every thirtieth day or so. For APIs that don't make requests to Wolfram Alpha or the knowledgebase, caching may not be needed. I used Wolfram Cloud to dynamically generate an ad (a new ad for each user) that was shown on this site for several months, and it hardly cost me any cloud credits at all. $\endgroup$
    – C. E.
    Commented Jun 25, 2017 at 18:14
  • $\begingroup$ If you are using WordPress, then my WordPress plugin can provide a way to insert API results into blog posts in the way you suggest in your post. There are examples in the documentation. Also note that to "spin up a Mathematica server" would probably require a very expensive license. $\endgroup$
    – C. E.
    Commented Jun 25, 2017 at 18:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.