Skip to content

Commit

Permalink
Deployed 32b1956 with MkDocs version: 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
raznem committed Sep 23, 2024
1 parent 0931c22 commit 160823b
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 12 deletions.
116 changes: 115 additions & 1 deletion api/getting-started/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,17 @@



<label class="md-nav__link md-nav__link--active" for="__toc">


<span class="md-ellipsis">
Getting started
</span>


<span class="md-nav__icon md-icon"></span>
</label>

<a href="./" class="md-nav__link md-nav__link--active">


Expand All @@ -496,6 +507,52 @@

</a>



<nav class="md-nav md-nav--secondary" aria-label="Table of contents">






<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#extract-endpoint" class="md-nav__link">
<span class="md-ellipsis">
Extract endpoint
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#parse-endpoint" class="md-nav__link">
<span class="md-ellipsis">
Parse endpoint
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#swagger-doc" class="md-nav__link">
<span class="md-ellipsis">
Swagger doc
</span>
</a>

</li>

</ul>

</nav>

</li>


Expand Down Expand Up @@ -569,6 +626,41 @@



<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#extract-endpoint" class="md-nav__link">
<span class="md-ellipsis">
Extract endpoint
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#parse-endpoint" class="md-nav__link">
<span class="md-ellipsis">
Parse endpoint
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#swagger-doc" class="md-nav__link">
<span class="md-ellipsis">
Swagger doc
</span>
</a>

</li>

</ul>

</nav>
</div>
</div>
Expand All @@ -587,7 +679,8 @@

<h1 id="getting-started">Getting started</h1>
<p>First, go to <a href="https://parsera.org/app">Parsera web page</a> and generate an API key.</p>
<p>Paste this key to <code>X-API-KEY</code> header to send the request:
<h2 id="extract-endpoint">Extract endpoint</h2>
<p>Paste this key to <code>X-API-KEY</code> header to send the request to <code>extract</code> endpoint:
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>curl<span class="w"> </span>https://api.parsera.org/v1/extract<span class="w"> </span><span class="se">\</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>--header<span class="w"> </span><span class="s1">&#39;Content-Type: application/json&#39;</span><span class="w"> </span><span class="se">\</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>--header<span class="w"> </span><span class="s1">&#39;X-API-KEY: &lt;YOUR_API_KEY&gt;&#39;</span><span class="w"> </span><span class="se">\</span>
Expand All @@ -607,6 +700,27 @@ <h1 id="getting-started">Getting started</h1>
</span><span id="__span-0-17"><a id="__codelineno-0-17" name="__codelineno-0-17" href="#__codelineno-0-17"></a><span class="s1">}&#39;</span>
</span></code></pre></div></p>
<p>By default, <code>proxy_country</code> is random, it's recommended to set <code>proxy_country</code> parameter to a specific country in the request since a page could not be available from all locations. <a href="../proxy/">Here</a> you can find a full list of proxy countries available.</p>
<h2 id="parse-endpoint">Parse endpoint</h2>
<p>In addition to <code>extract</code>, there is a <code>parse</code> endpoint that can be used to parse data generated on your side instead of one from url.<br />
There is a <code>content</code> attribute for passing data, which accepts both raw html and string:<br />
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>curl<span class="w"> </span>https://api.parsera.org/v1/parse<span class="w"> </span><span class="se">\</span>
</span><span id="__span-1-2"><a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a>--header<span class="w"> </span><span class="s1">&#39;Content-Type: application/json&#39;</span><span class="w"> </span><span class="se">\</span>
</span><span id="__span-1-3"><a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a>--header<span class="w"> </span><span class="s1">&#39;X-API-KEY: &lt;YOUR_API_KEY&gt;&#39;</span><span class="w"> </span><span class="se">\</span>
</span><span id="__span-1-4"><a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a>--data<span class="w"> </span><span class="s1">&#39;{</span>
</span><span id="__span-1-5"><a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a><span class="s1"> &quot;content&quot;: &lt;HTML_OR_TEXT_HERE&gt;,</span>
</span><span id="__span-1-6"><a id="__codelineno-1-6" name="__codelineno-1-6" href="#__codelineno-1-6"></a><span class="s1"> &quot;attributes&quot;: [</span>
</span><span id="__span-1-7"><a id="__codelineno-1-7" name="__codelineno-1-7" href="#__codelineno-1-7"></a><span class="s1"> {</span>
</span><span id="__span-1-8"><a id="__codelineno-1-8" name="__codelineno-1-8" href="#__codelineno-1-8"></a><span class="s1"> &quot;name&quot;: &quot;Title&quot;,</span>
</span><span id="__span-1-9"><a id="__codelineno-1-9" name="__codelineno-1-9" href="#__codelineno-1-9"></a><span class="s1"> &quot;description&quot;: &quot;News title&quot;</span>
</span><span id="__span-1-10"><a id="__codelineno-1-10" name="__codelineno-1-10" href="#__codelineno-1-10"></a><span class="s1"> },</span>
</span><span id="__span-1-11"><a id="__codelineno-1-11" name="__codelineno-1-11" href="#__codelineno-1-11"></a><span class="s1"> {</span>
</span><span id="__span-1-12"><a id="__codelineno-1-12" name="__codelineno-1-12" href="#__codelineno-1-12"></a><span class="s1"> &quot;name&quot;: &quot;Points&quot;,</span>
</span><span id="__span-1-13"><a id="__codelineno-1-13" name="__codelineno-1-13" href="#__codelineno-1-13"></a><span class="s1"> &quot;description&quot;: &quot;Number of points&quot;</span>
</span><span id="__span-1-14"><a id="__codelineno-1-14" name="__codelineno-1-14" href="#__codelineno-1-14"></a><span class="s1"> }</span>
</span><span id="__span-1-15"><a id="__codelineno-1-15" name="__codelineno-1-15" href="#__codelineno-1-15"></a><span class="s1"> ],</span>
</span><span id="__span-1-16"><a id="__codelineno-1-16" name="__codelineno-1-16" href="#__codelineno-1-16"></a><span class="s1">}&#39;</span>
</span></code></pre></div></p>
<h2 id="swagger-doc">Swagger doc</h2>
<p>You can also explore Swagger doc of the API following this link: <a href="https://api.parsera.org/docs#/">https://api.parsera.org/docs#/</a>.</p>


Expand Down
Loading

0 comments on commit 160823b

Please sign in to comment.