Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7051459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:15:58+00:00 2026-05-28T03:15:58+00:00

I’m querying an API by using cURL (GET), and the API gives me only

  • 0

I’m querying an API by using cURL (GET), and the API gives me only 25 results per call (it’s a hard limit and there’s nothing I can do about it since it’s not mine).

The results look like:

<response v="2">
    <query>my nifty query</query>
    <location>new york, ny</location>
    <totalresults>920</totalresults>
    <start>1</start>
    <end>25</end>
    <pageNumber>0</pageNumber>
    <results>
        <result></result>
        <result></result>
        ...
    </results>
</response>

The total results (which appear on the returned xml [above]) can contain up to 1,000 results, and in like most cases, I usually have 1,000 results per query, so I basically have to call the API 40 times (i.e. 25 results-per-call × 40 calls = 1,000 results). Every call, I change the API start parameter and increase it by 25 (i.e. 0, 25, 50, …, 975).

This whole process takes about 8 seconds to complete, as I currently call the API in a synchronous way (I’m using curl_exec() to execute the GET command, one by one in a for loop). Is there any efficient and faster way to call the API in a parallel way and get these results faster? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:15:58+00:00Added an answer on May 28, 2026 at 3:15 am

    You can execute multiple a-synchronous cURL calls with curl_multi_exec(). This will allow you to execute multiple calls simultaneously.

    Just be aware that when querying the same server multiple times, there is an upper limit to the number of concurrent requests vs. efficiency ratio. I’m sure I remember reading that after a lot or research, Facebook concluded that this limit was between 3 and 4 concurrent requests, but I cannot find the reference so I may have imagined it. This would depend on the server and client you were using, so really I would say you will just have have to suck it and see.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.